PDF-XChange - Tracker PDF Viewer - TIFF-XChange - Image-XChange - XMF-XChange - Raster-XChange - Support

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

 
pmazurk
User
Topic Author
Posts: 27
Joined: Tue Feb 22, 2011 10:25 pm

Determine content alignment so page can be rotated if necessary

Fri Nov 30, 2018 5:46 pm

We need to detect the alignment of content on a page so we can rotate that page such that the content is correctly oriented. I know about PXCp_PageGetRotate and PXCp_PageSetRotate. Those calls turn the page from landscape to portrait or some variation of that, but they do not change the orientation of the content. If we can detect the orientation of the content we can call PXCp_PageSetRotate to correct it. Are there any functions that can detect content alignment?

Also - I'm finding that PXCp_PageGetRotate always returns 270 if the page is in landscape. Why does it not return 90 if it's in landscape upside down?
 
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 13077
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Determine content alignment so page can be rotated if necessary

Thu Dec 06, 2018 1:19 pm

Hello pmazurk,

I am afraid that we do not offer such algorithms. There might be some available somewhere - but it is really hard to determine the orientation a page should have even if there is actual text on it - and in some cases it might be a scanned and rotated page.
Please take a look at the attached sample - it is not possible in it to determine which is the correct orientation. I know this is an extreme case - but it is to illustrate our reasoning as to why we do not offer such algorithms ourselves.

If your task is more specific - can you please try explaining it in a bit more detail?

Regards,
Stefan
Attachments
sample_1.pdf
(4.22 KiB) Downloaded 3 times

Who is online

Users browsing this forum: No registered users and 1 guest