Implement digital signature detection

This commit is contained in:
James R. Barlow
2023-08-12 01:20:20 -07:00
parent 6e20439c91
commit 45added738
3 changed files with 30 additions and 0 deletions
+12
View File
@@ -108,6 +108,18 @@ class EncryptedPdfError(ExitCodeException):
)
class DigitalSignatureError(ExitCodeException):
"""PDF has a digital signature."""
exit_code = ExitCode.input_file
message = dedent(
"""\
Input PDF has a digital signature. OCR would alter the document,
invalidating the signature.
"""
)
class TesseractConfigError(ExitCodeException):
"""Tesseract config can't be parsed."""