Skip to content
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

weird text order #64

Closed
femifrak opened this issue Jan 31, 2014 · 4 comments
Closed

weird text order #64

femifrak opened this issue Jan 31, 2014 · 4 comments
Milestone

Comments

@femifrak
Copy link

OCRmyPDF is brilliant but sometimes i have a problem with the order of text that is underlaid. When i select the text starting from top left and go to the right end of the line and then successively down line by line, there are sometimes gaps of text which is not selected. After a few more lines these gaps are suddenly selected. Copying the selected text and pasting it into another application reveals the order, which is unfortunately wrong. I use latest stable version and have no error or warning messages.

http://www.loaditup.de/files/803343_acxm67dsue.pdf
(problem occurs in second paragraph.)

@fritz-hh
Copy link
Owner

I could not reproduce the issue:

  • neither with the PDF viewer embedded in firefox v26.0
  • nor with Adobe Reader XI.

It is possible, that the issue only occurs with some PDF readers? With reader do you use?

@femifrak
Copy link
Author

I use the "Document Viewer 1.2.0" which can be launched with "atril".
When using Foxit Reader the text order is correct.
That is very good news. Thanks a lot for testing.

@femifrak
Copy link
Author

femifrak commented Feb 1, 2014

As the output format is pdf/a i am worried why some pdf readers cannot handle the text correctly. I see three possible reasons: 1) pdf/a is not well enough defined 2) The reader is really not accaptable 3) The output is not 100% pdf/a
As i want to use OCRmyPDF for archiving files, the text output could be unreadable in future.

@ghost ghost mentioned this issue Feb 3, 2014
@fritz-hh
Copy link
Owner

fritz-hh commented Feb 4, 2014

1 and 3 are not the reason.
OCRmyPDF uses very mature tools (e.g. ghostscript) to generate the PDF/A file. Furthermore, OCRmyPDF validates the generated file against the PDF/A standard using jhove. Therefore the risk is very low that the file will won't be readable in the future. (Alltough I use OCRmyPDF for archiving files too, I cannot / won't provide any warranty...)
As discribed in #66, because the text layer is made of disconnected words and lines, basic PDF-reader can have difficulties to select the text accurately/reliably. Advanced PDF-readers should not have any problem. Seaching for words in the PDF should be possible even with basic PDF-readers.

If I have time, I will analyze how it is possible to improve selection accuracy on basic some PDF-readers. Therefore, I reopen the ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants