mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-19 21:16:56 +01:00
Chore: Bulk backend dependency updates (#8212)
This commit is contained in:
parent
a6f4c75a72
commit
d1f255a22e
8 changed files with 1883 additions and 1514 deletions
|
|
@ -365,6 +365,7 @@ class RasterisedDocumentParser(DocumentParser):
|
|||
from ocrmypdf import EncryptedPdfError
|
||||
from ocrmypdf import InputFileError
|
||||
from ocrmypdf import SubprocessOutputError
|
||||
from ocrmypdf.exceptions import DigitalSignatureError
|
||||
|
||||
archive_path = Path(os.path.join(self.tempdir, "archive.pdf"))
|
||||
sidecar_file = Path(os.path.join(self.tempdir, "sidecar.txt"))
|
||||
|
|
@ -387,9 +388,9 @@ class RasterisedDocumentParser(DocumentParser):
|
|||
|
||||
if not self.text:
|
||||
raise NoTextFoundException("No text was found in the original document")
|
||||
except EncryptedPdfError:
|
||||
except (DigitalSignatureError, EncryptedPdfError):
|
||||
self.log.warning(
|
||||
"This file is encrypted, OCR is impossible. Using "
|
||||
"This file is encrypted and/or signed, OCR is impossible. Using "
|
||||
"any text present in the original file.",
|
||||
)
|
||||
if original_has_text:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue