How to determine the coordinate plane of a PDF file? #3386
-
My task is to use page.search_for to find text and highlight it. The problem is that the files may have either different rotation or a different coordinate plane, because I need to mark correctly for any rotation and coordinate plane, then it is enough to understand in what form the plane comes from the PDF file. Tell me how to understand this? Matrix multiplication did not help, I have already tried various ways to determine this. As I understand it, pdf has two types of planes, x horizontal, y vertical and vice versa. I need to be able to identify them, because in this case the drawing coordinates change (since I need to select them horizontally with a stripe). My hypothesis is that these coordinate planes depend on whether the PDF file is in portrait format or landscape. I would be grateful for any parting words! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
This is a typical Discussions item, so we converted the original issue.
|
Beta Was this translation helpful? Give feedback.
-
Can we determine the correct orientation of the file without OCR? |
Beta Was this translation helpful? Give feedback.
What do you mean?
You have
page.rotation
, you have text writing direction if needed viapage.get_text("dict", ...)
. What else do you need?