-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Garbled order of OCR'ed contents #1035
Comments
You can try Some PDF viewers also struggle with OCR placement. |
For the PDF viewer in question (Evince), |
I also have this problem with a typewritten document. The content is misplaced. It is somehow shifted downwards about two lines. The |
So, it appears that the problem for me happens when I use the option Edit: This is not true. I probably just looked at the one page that had the text in the correct position. |
Ok, I figured it out. The problem was in using the argument |
I've encountered a typewritten but high-resolution and clearly legible PDF whose OCR text is somehow misplaced after being generated: The file in question is this thesis. For example, page 3 is a good pure-text example of where this behavior occurs (I won't paste the page here because I'm unsure about copyright issues).
More explicitly, it seems that Tesseract (more or less) correctly identifies all the words and their order (as can also be verified using
--sidecar
), but when grafting the OCR contents back onto the PDF, the text or its bounding box gets misplaced. For example, when highlighting OCR'ed phrases spanning more than one word, the position of the words evidently does not follow the left-to-right, top-to-bottom order that it should, and instead of highlighting two adjacent words, half the page is highlighted. This can also be verified by copy-pasting (i.e., CTRL-A, CTRL-C) the entire text, which results in a garbled version of the original Tesseract/sidecar text.This occurred on both v13.4 and v13.5 with tesseract 4.1.1 when running OCRmyPDF without any further options. Is there an option I should be trying here?
The text was updated successfully, but these errors were encountered: