Suggestions from review
This commit is contained in:
parent
eb748ee6c2
commit
26e95ea117
@ -777,7 +777,7 @@ but could result in missing text content.
|
||||
!!! warning
|
||||
|
||||
The limit is intended to prevent malicious files from consuming
|
||||
system resources and causing crashes and other errors. Only increase
|
||||
system resources and causing crashes and other errors. Only change
|
||||
this value if you are certain your documents are not malicious and
|
||||
you need the text which was not OCRed
|
||||
|
||||
|
@ -299,7 +299,11 @@ class RasterisedDocumentParser(DocumentParser):
|
||||
):
|
||||
# Convert pixels to mega-pixels and provide to ocrmypdf
|
||||
max_pixels_mpixels = self.settings.max_image_pixel / 1_000_000.0
|
||||
self.log.debug(f"Calculated {max_pixels_mpixels} megapixels for OCR")
|
||||
if max_pixels_mpixels == 0:
|
||||
msg = "OCR pixel limit is disabled!"
|
||||
else:
|
||||
msg = f"Calculated {max_pixels_mpixels} megapixels for OCR"
|
||||
self.log.debug(msg)
|
||||
ocrmypdf_args["max_image_mpixels"] = max_pixels_mpixels
|
||||
|
||||
return ocrmypdf_args
|
||||
|
Loading…
x
Reference in New Issue
Block a user