mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-02 13:45:10 -05:00
fix up the ocrmypdf parameter construction for clean-final and redo
This commit is contained in:
parent
a13e9f23b1
commit
265432f2a5
@ -155,8 +155,11 @@ 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
|
||||
ocrmypdf_args['clean_final'] = True
|
||||
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':
|
||||
ocrmypdf_args['deskew'] = True
|
||||
|
Loading…
x
Reference in New Issue
Block a user