How to convert text elements coordinates in images after OCR (pdfocr_save) to hosting PDF coordinates #1458
-
I tried few options
All above did not help to get correct coordinates Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 9 replies
-
more detail please: how did you make the "image OCR" and which coordinates do you need: text, image ...? |
Beta Was this translation helpful? Give feedback.
-
The image blocks of Once you have those (they are MuPDF coordinates) simply apply |
Beta Was this translation helpful? Give feedback.
-
This script is even somewhat simpler as it uses the new |
Beta Was this translation helpful? Give feedback.
-
The main logic therefore is:
As mentioned, to obtain PDF coordinates, compute |
Beta Was this translation helpful? Give feedback.
bboxing.zip
This script is even somewhat simpler as it uses the new
Rect
methodtorect
.