mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-20 05:26:53 +01:00
Fix: Add a warning about a low image DPI which may cause OCR to fail (#4708)
This commit is contained in:
parent
0913c7aa9e
commit
e1b573adeb
1 changed files with 4 additions and 0 deletions
|
|
@ -244,6 +244,10 @@ class RasterisedDocumentParser(DocumentParser):
|
||||||
f"no DPI information is present in this image and "
|
f"no DPI information is present in this image and "
|
||||||
f"OCR_IMAGE_DPI is not set.",
|
f"OCR_IMAGE_DPI is not set.",
|
||||||
)
|
)
|
||||||
|
if ocrmypdf_args["image_dpi"] < 70: # pragma: no cover
|
||||||
|
self.log.warning(
|
||||||
|
f"Image DPI of {ocrmypdf_args['image_dpi']} is low, OCR may fail",
|
||||||
|
)
|
||||||
|
|
||||||
if settings.OCR_USER_ARGS and not safe_fallback:
|
if settings.OCR_USER_ARGS and not safe_fallback:
|
||||||
try:
|
try:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue