Skip to content

A community-supported supercharged document management system: scan, index and archive all your documents

Apply user arguments even in the case of the safe fallback to forcing OCR (#4981)

Trenton H92a920021d1c
diff --git a/docs/configuration.md b/docs/configuration.md
index 87d992443..b2e479f98 100644
--- a/docs/configuration.md
+++ b/docs/configuration.md
@@ -733,7 +733,7 @@ they use underscores instead of dashes.
Paperless has been tested to work with the OCR options provided
above. There are many options that are incompatible with each other,
so specifying invalid options may prevent paperless from consuming
- any documents.
+ any documents. Use with caution!
Specify arguments as a JSON dictionary. Keep note of lower case
booleans and double quoted parameter names and strings. Examples:
diff --git a/src/paperless_tesseract/parsers.py b/src/paperless_tesseract/parsers.py
index babcf6bcf..46d106bd7 100644
--- a/src/paperless_tesseract/parsers.py
+++ b/src/paperless_tesseract/parsers.py
@@ -254,7 +254,7 @@ class RasterisedDocumentParser(DocumentParser):
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:
try:
user_args = json.loads(settings.OCR_USER_ARGS)
ocrmypdf_args = {**ocrmypdf_args, **user_args}