Open neurolabs opened 1 year ago
Excuse me asking. Do you have any idea yet whether this should be fixed in the codebase or whether it's a wont-fix in your opinion?
Some more background: I discovered this issue while feeding a real world pdf to https://github.com/paperless-ngx/paperless-ngx , and from my point of view, tackling this issue in OCRmyPDF makes the most sense.
It can and should be fixed in ocrmypdf, but I'm short on time.
This is a superficially easy fix. It's not hard to force a lower limit on resolution.
It's more difficult to find out why the resolution comes out low for that PDF, if our calculation of resolution is wrong, if the PDF is malformed, or if there are cases where resolution is legitimately low and keeping it low is the right decision.
You're welcome to take a stab at it.
Thanks for the clarification. If the moons align, I might poke at it, but I'm also short on time.
Describe the bug When calling ocrmypdf 14.2.0 on the example file, ghostscript gets called with the resolution parameter set to
-r1.209464x1.209464
, which leads to an errorUnrecoverable error: rangecheck in setscreen
. If I call ghostscript with a higher resolution setting manually (e.g. 100x100), ghostscript succeeds.To Reproduce
Example file blank.pdf
Expected behavior ocrmypdf should not call ghostscript with resolution parameters that make ghostscript fail
System