Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to read files password-protected by Adobe Protect PDF online tool #62

Closed
lorenzobergama6 opened this issue Feb 9, 2024 · 4 comments
Assignees
Labels
bug Something isn't working priority-medium
Milestone

Comments

@lorenzobergama6
Copy link

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:

Corrupt stream data.
Unable to decompress stream data for object 4: Data error.
Unable to find pages object.

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.

@michaelrsweet
Copy link
Owner

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.

@lorenzobergama6
Copy link
Author

Here they are:
test.pdf
test-protected.pdf
Password is "password" (without quotes).

@michaelrsweet
Copy link
Owner

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...

@michaelrsweet
Copy link
Owner

[master 7d22477] Fix opening of certain encrypted PDF files (Issue #62)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority-medium
Projects
None yet
Development

No branches or pull requests

2 participants