pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tilman Hausherr <THaush...@t-online.de>
Subject Re: Possible coordinate space issue for field bounding box
Date Mon, 28 Nov 2016 17:54:45 GMT
I haven't tested it, but please try this first:


new PDPageContentStream(doc, page, AppendMode.APPEND, true);


new PDPageContentStream(doc, page, AppendMode.APPEND, true, true);


Am 28.11.2016 um 18:24 schrieb Andrew Done:
> Hi all,
> I have an issue that has plagued me for a couple of days; namely, I'm
> trying to replace a field in a document with a rendered image, but that
> image is NOT written to the point in the image I would hope.
> You can see a summary of this issue here:
> https://github.com/ayuudee/issue-pad/tree/master/src/com/jesusthecat/pdf
> Specifically, note:
>     1. The files d1.pdf and d2.pdf have been processed through Example.java
>     to produce d1-out.pdf and d2-out.pdf respectively.
>     2. Example.java is trying to place a 5x5 square in the bottom left
>     corner of the red box (the field).
>     3. The file d2.pdf has been generated from wkhtmltopdf and contains a
>     single field 'foo'.
>     4. The file d1.pdf is d2.pdf saved through PDF Studio (more on this
>     below).
> The d1 pair demonstrates the behaviour I would expect. There is 5x5 box at
> the bottom left corner of the field.
> The d2 pair does not, so something in the saving operation of PDF Studio
> causes the box to be placed at the intended spot. More likely, I suppose
> that something in the original d1.pdf is missing that is fixed by PDF
> Studio.
> My questions are these:
>     1. What is the root cause of this issue? Is there a way that one can
>     debug these sorts of issues?
>     2. Is there a way I can change Example.java such that it could process
>     d2.pdf (and PDF files similar to it) to produce a correct result; that is,
>     where the box is correctly positioned in the bottom left corner.
> Thanks for your help.
> Regards,
> Andrew.

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