How to retrieve the exact location when the page has a rotation

PDF-XChange Editor SDK for Developers

Moderators: TrackerSupp-Daniel, Tracker Support, Paul - Tracker Supp, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan

Forum rules
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.

When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
prasantha
User
Posts: 43
Joined: Fri Jun 24, 2022 8:15 am

How to retrieve the exact location when the page has a rotation

Post by prasantha »

I have a document which is rotated by 270 degrees.(page.Rotation is 270) and when I try to to Get the location of the content item (IPXC_ContentItem) it does not give the correct location. but when i get the location of a page that is not rotated, it gives the ocrrect value (I converted the points to mm then its same as in the editor view)

I used the IPXC_ContentItem.Bbox objects left , right , top and bottom values to locat the rectangle.

Can anyone let me know how can i retrieve the correct location in rotated page?

Thank you
prasatha
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17960
Joined: Mon Jan 12, 2009 8:07 am
Location: London

Re: How to retrieve the exact location when the page has a rotation

Post by Tracker Supp-Stefan »

Hello prasantha,

You will need to get and work with the page's transformation matrix:
https://sdkhelp.pdf-xchange.com/vi ... _GetMatrix
To get your desired coordinates.

I found e.g. this topic where rotating content is discussed:
viewtopic.php?p=108385&hilit=get_Rotation#p108385
Which you might also find helpful

Kind regards,
Stefan