Fix the coverage by being tricky
This commit is contained in:
parent
26e95ea117
commit
22910c2c78
@ -299,10 +299,11 @@ class RasterisedDocumentParser(DocumentParser):
|
|||||||
):
|
):
|
||||||
# Convert pixels to mega-pixels and provide to ocrmypdf
|
# Convert pixels to mega-pixels and provide to ocrmypdf
|
||||||
max_pixels_mpixels = self.settings.max_image_pixel / 1_000_000.0
|
max_pixels_mpixels = self.settings.max_image_pixel / 1_000_000.0
|
||||||
if max_pixels_mpixels == 0:
|
msg = (
|
||||||
msg = "OCR pixel limit is disabled!"
|
"OCR pixel limit is disabled!"
|
||||||
else:
|
if max_pixels_mpixels == 0
|
||||||
msg = f"Calculated {max_pixels_mpixels} megapixels for OCR"
|
else f"Calculated {max_pixels_mpixels} megapixels for OCR"
|
||||||
|
)
|
||||||
self.log.debug(msg)
|
self.log.debug(msg)
|
||||||
ocrmypdf_args["max_image_mpixels"] = max_pixels_mpixels
|
ocrmypdf_args["max_image_mpixels"] = max_pixels_mpixels
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user