pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthew Clemente <mjcleme...@gmail.com>
Subject Re: embedded image does not appear with pdfbox 2.0.11
Date Sat, 21 Jul 2018 17:02:51 GMT
First of all, I *really* appreciate all the time and help.

Particularly, thanks for pointing me to the Debugger. Foolishly, I’d just
been using Acrobat to look at the properties, which led to some
unpredictable results.

I *think* that my solution requires setting both the Document Information
and the Metadata, due to the behavior of Acrobat, Preview, and other PDF
readers.

For the sake of posterity (and feedback, if anyone has any further
experience or insights), this is what I’m seeing.

For an original pdf document with the metadata in the Document Information
and XMP matching, if I only set the XMP data, Acrobat seems to prefer the
Document Information when it displays properties. If I only set the
Document Information, Acrobat prefers/displays the XMP metadata.
Consequently, in both cases it appeared to me that my code was not
overwriting the existing values, when it really was. Using the Debugger I
was able to see the changes to the XMP metadata and/or the Document
information.

In summary, setting both the XMP metadata and the document information
overwrites the existing data (and sets new metadata) without issue and
creates predictable results in various pdf readers.

Again, thanks for the help!

-- 
Matthew Clemente

From: Tilman Hausherr <thausherr@t-online.de> <thausherr@t-online.de>
Reply: users@pdfbox.apache.org <users@pdfbox.apache.org>
<users@pdfbox.apache.org>
Date: July 21, 2018 at 5:54:26 AM
To: users@pdfbox.apache.org <users@pdfbox.apache.org>
<users@pdfbox.apache.org>
Subject:  Re: embedded image does not appear with pdfbox 2.0.11

I don't remember about a memory leak with image creation.

The best would be that you create an issue in JIRA with minimal but
complete working code and PDF and image that worked for 2.0.9 and
doesn't work with 2.0.11.

If you can't, then compare the two files by looking at their structure
with PDFDebugger.

Tilman

Am 21.07.2018 um 11:09 schrieb Duke DAI:
> I have a service to render PDF form with embedded image. The code is very
> similar with the answer provided in stackoverflow,
>
https://stackoverflow.com/questions/46799087/how-to-insert-image-programmatically-in-to-acroform-field-using-java-pdfbox
> .
>
> With pdfbox 2.0.9, it works that pdf can be generated well with text and
> image. But there is native memory leak(no problem with JVM heap(and
> non-heap?)), memory footprint of process is bumping up along with more
pdf
> generated, especially with the first pdfs.
> Then I upgraded pdfbox to 2.0.11 or 2.0.10, then native memory leak
> disappeared. But image can't be embedded(maybe that's the reason why
native
> memory leak disappeared.
>
> Can you shed me some light on this issue? What have been changed when
> solving memory leak issue in 2.0.10 or 2.0.11?
>
> Appreciate for your help.
>
>
> Thanks
> Duke
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message