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?
Determine content alignment so page can be rotated if necessary
Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Tracker Supp-Stefan
- Tracker Supp-Stefan
- Site Admin
- Posts: 17944
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
- Contact:
Re: Determine content alignment so page can be rotated if necessary
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
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 247 times