Closed lorenzobergama6 closed 3 months ago
Can you attach the before and after PDF files that show this? I've been separately tracking what might be the same issue (#42), but haven't figured out the proper fix yet.
Here they are: test.pdf test-protected.pdf Password is "password" (without quotes).
What's interesting is that the last 16 bytes of the user password value are nul (0)... This is technically allowed (you are supposed to pad with 16 bytes of arbitrary data) but might be significant...
[master 7d22477] Fix opening of certain encrypted PDF files (Issue #62)
Apparently PDFio cannot open PDF files that were password-protected via this online tool by Adobe. The encryption label is PDFIO_ENCRYPTION_AES_128. In fact, the files are properly decrypted but afterwards the following error messages appear:
The same unprotected files are read correctly.
I have tried this by adding a test in the test routine of the provided Visual Studio solution on Windows 11. Thank you.
P.S. The following does not have to do with this issue, but it is just a brief comment. The encryption labeled by PDFIO_ENCRYPTION_AES_256 corresponds to V6 R6. However from the PDF 2.0 specifications I understand that it should be associated with V5 R6; also I have a protected 2.0 PDF which has indeed V=5 and R=6.