Invalidate digital signatures for uploaded PDF files
Description
On line 54 from papermerge/core/ocr/document.py, where the function ocrmypdf.ocr() is declared, the invalidate-digital-signature flag is missing.
Right now, digitally signed PDF's (even if they have already the text embedded into them) won't be searchable because they cannot go through the OCR function.
This won't interfere with the non-repudiation property of the signed PDF file itself as Papermerge stores two versions of the PDF: the uploaded one and the OCRed one.
Sources https://ocrmypdf.readthedocs.io/en/latest/api.html https://ocrmypdf.readthedocs.io/en/latest/pdfsecurity.html#digital-signatures
Info:
- Papermerge Version 3.2
- Docker 26.0.2
- Docker Compose 2.26.1
- OS: Raspbian 12 (bookworm)
https://github.com/ciur/papermerge/issues/603
Related