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

This commit is contained in:
Trenton H authored and GitHub committed 2023-12-14 11:20:47 -08:00
1 parent 72000cac36
commit 92a920021d
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -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:
+1 -1
View File
@@ -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}