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
ZeroDivisionError #253
Comments
The log is probably enough for me to fix it.
You should be able to work around it with by adding the argument
--pdf-renderer tesseract
…On Sat, Apr 14, 2018, 10:46 jullit31, ***@***.***> wrote:
When running a specific PDF (wich I cannot share here) I get a ZeroDivisionError:
float division by zero error. The PDF was created from PNGs using PDF24.
Other PDFs created in the same manner work fine, as does piping img2pdf's
output using the same PNGs.
Running ocrmypdf -v 1 in.pdf out.pdf |& tee debug.txt gives me this:
debug.txt <https://github.com/jbarlow83/OCRmyPDF/files/1910673/debug.txt>
I'm running Ubuntu 16.04 with the WSL.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#253>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABvcM4vc-5bkH7wSFvdMrHFnv9cb-amCks5tojXjgaJpZM4TVKJV>
.
|
Issue #253 - PDF that produces the error is not available, but if font_width is zero, chances are the text is nonprinting characters, so suppress it.
I can confirm that this solved the problem. Thanks! |
I recently got a strange PDF from a university scanning service, the second of 2 PDFs. The first PDF processed without any issues, but the second one crashes with the same division by zero error as above:
However, the workaround suggested no longer seems to exist? Trying with
I'm pretty sure I have Tesseract installed. And if I run with As another workaround, I tried opening in gscan2pdf, deleting pages which looked extremely weird (like a single large character), exporting to DJVU (due to a gscan2pdf filesize issue if you export to PDF directly), converting to PDF with
A puzzling PDF. I'm not sure how to deal with these errors, so for now I'm settling for the first PDF/half being properly processed, leaving the second half alone, and just concatenating them into a single PDF. |
When running a specific PDF (wich I cannot share here) I get a
ZeroDivisionError: float division by zero
error. The PDF was created from PNGs using PDF24. Other PDFs created in the same manner work fine, as does pipingimg2pdf
's output using the same PNGs.Running
ocrmypdf -v 1 in.pdf out.pdf |& tee debug.txt
gives me this:debug.txt
I'm running Ubuntu 16.04 with the WSL.
The text was updated successfully, but these errors were encountered: