Am 07.01.2018 um 11:17 schrieb chitgoks:
hi tilman ok

i dont understand what the norotate flag is for

See in the PDF specification: "If set, do not rotate the annotation’s appearance to match the rotation of the page. The upper-left corner of the annotation rectangle shall remain in a fixed location on the page, regardless of the page rotation. See further discussion following this Table."

If you do your own rendering you need to do the transformations (rotation + appropriate translation, because a "pure" rotation is around a corner and not around the middle) similar to PDFRenderer.java before displaying the annotations. Unless the flag is set. (Which is a problem for PDFBox, because we always have the transformations already active when rendering annotations, so one would have to temporarly "undo" these when rendering "NoRotate" annotations)

Tilman



so far, i have managed to fix square, circle and stamps and currently
working on fixing free text's appearance.

i think my biggest hurdle is the point based annotations like line, arrows,
polygons because they seem to be rendered opposite

On Sun, Jan 7, 2018 at 6:11 PM, Tilman Hausherr <[email protected]>
wrote:

Hi,
"Adding" is always supported but as you know PDFBox doesn't offer much
high level help with creating PDFs. Rendering is also correct, unless the
NoRotate flag is set. For an example, see this issue:
https://github.com/mozilla/pdf.js/issues/7631

Tilman

Am 07.01.2018 um 03:11 schrieb chitgoks:

hi tilman

does this means adding annotations in landscape is not supported yet?

thanks

On Sat, Jan 6, 2018 at 7:35 PM, Tilman Hausherr <[email protected]>
wrote:

Am 06.01.2018 um 11:19 schrieb chitgoks:
regarding my previous email on landscape
it looks like portrait or landscape have same bbox but for landscape
there
is a rotation value

does pdfbox have some sort of convenience method to get bbox (like in
itext
page.getPageSizeWithRotation()) based on rotation? or how to do this
manually in pdfbox?


You'll have to do it by hand, see in PDFRenderer how the page is
prepared.

If you support the "NoRotate" flag (which PDFBox does not support yet in
rendering annotations) then it is more tricky.

Tilman



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]




---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to