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

Don't exit when qpdf repairs the file successfully but displays warning #34

Merged
merged 2 commits into from
Dec 17, 2015

Conversation

shemgp
Copy link

@shemgp shemgp commented Dec 17, 2015

OCRmyPDF exits when a PDF file is a little bit broken but is successfully repaired by qpdf. I think it should just display the warning and continue.

Here's a sample error display:
WARNING: /home/shemgp/Desktop/Rusli Heince - Clearance.pdf: reported number of objects (7) inconsistent with actual number of objects (8)
WARNING: /home/shemgp/Desktop/Rusli Heince - Clearance.pdf: file is damaged
WARNING: /home/shemgp/Desktop/Rusli Heince - Clearance.pdf (object 5 0, file position 446097): expected 5 0 obj
WARNING: /home/shemgp/Desktop/Rusli Heince - Clearance.pdf: Attempting to reconstruct cross-reference table
WARNING: /home/shemgp/Desktop/Rusli Heince - Clearance.pdf (object 2 0, file position 445846): stream keyword followed by carriage return only
WARNING: /home/shemgp/Desktop/Rusli Heince - Clearance.pdf (object 1 0, file position 176): stream keyword followed by carriage return only
qpdf: operation succeeded with warnings; resulting file may have some problems

@jbarlow83
Copy link
Collaborator

Looks good - thanks.

jbarlow83 added a commit that referenced this pull request Dec 17, 2015
Don't exit when qpdf repairs the file successfully but displays warning
@jbarlow83 jbarlow83 merged commit 9f37446 into ocrmypdf:master Dec 17, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants