mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-02 13:45:10 -05:00
respect settings.skip_archive_file before OCR fails
This commit is contained in:
parent
a9ef7ff58e
commit
71d7a8ab0c
@ -378,13 +378,13 @@ class RasterisedDocumentParser(DocumentParser):
|
||||
sidecar_file,
|
||||
)
|
||||
|
||||
if self.settings.skip_archive_file != ArchiveFileChoices.ALWAYS:
|
||||
self.archive_path = archive_path
|
||||
|
||||
try:
|
||||
self.log.debug(f"Calling OCRmyPDF with args: {args}")
|
||||
ocrmypdf.ocr(**args)
|
||||
|
||||
if self.settings.skip_archive_file != ArchiveFileChoices.ALWAYS:
|
||||
self.archive_path = archive_path
|
||||
|
||||
self.text = self.extract_text(sidecar_file, archive_path)
|
||||
|
||||
if not self.text:
|
||||
|
Loading…
x
Reference in New Issue
Block a user