[ 
https://issues.apache.org/jira/browse/PDFBOX-4410?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16724053#comment-16724053
 ] 

Tilman Hausherr commented on PDFBOX-4410:
-----------------------------------------

That's the point of a rotation. You need to apply the rotation to the 
coordinates you get. That's why I asked whether you want to paint into an 
image. Note that in an unrotated page y = 0 is the bottom. In java image 
coordinates, y = 0 is the top. I don't know about C# and we don't support C#. 
It gets more tricky if the PDF has a cropbox where the origin is not 0,0 
because then you'll have to consider that as well.

But all this isn't a "bug". That is your job as a developer to apply the 
rotation. For 90° it's probably x' = y, and y' = width - x. Take a piece of 
paper and write down coordinates and then move the paper and you'll quickly see 
what to do.

> Not getting location of Form-Field correct when page has landscape orientation
> ------------------------------------------------------------------------------
>
>                 Key: PDFBOX-4410
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-4410
>             Project: PDFBox
>          Issue Type: Bug
>          Components: AcroForm
>    Affects Versions: 2.0.12
>            Reporter: Amit Maheshwari
>            Priority: Critical
>         Attachments: RPA_WTA_Extended (1).pdf
>
>
> In my client application, I need to know the location of form fields.
> *For getting the location, I am relaying on those widgets of field which has 
> non-negative page number.*
>  
> In attached Pdf File ( [^RPA_WTA_Extended (1).pdf] ). when it changes 
> orientation (page - 10), I could see widgets with non-negative page number 
> was giving me improper location.
>  
> For getting page I'm doing this:
> {code:java}
> int getPageOfWidget(PDAnnotationWidget widget, PDPageTree pages)
> {
>    return pages.indexOf(widget.getPage()); 
> }
> {code}
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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

Reply via email to