mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-10 00:35:30 +01:00
fix up the ocrmypdf parameter construction for clean-final and redo
This commit is contained in:
parent
a13e9f23b1
commit
265432f2a5
1 changed files with 5 additions and 2 deletions
|
|
@ -155,7 +155,10 @@ class RasterisedDocumentParser(DocumentParser):
|
|||
|
||||
if settings.OCR_CLEAN == 'clean':
|
||||
ocrmypdf_args['clean'] = True
|
||||
elif settings.OCR_CLEAN == 'clean-final' and not settings.OCR_MODE == 'redo': # NOQA: E501
|
||||
elif settings.OCR_CLEAN == 'clean-final':
|
||||
if settings.OCR_MODE == 'redo':
|
||||
ocrmypdf_args['clean'] = True
|
||||
else:
|
||||
ocrmypdf_args['clean_final'] = True
|
||||
|
||||
if settings.OCR_DESKEW and not settings.OCR_MODE == 'redo':
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue