Exception when opening Adobe PDF file with password protected file attachment

Hi Team,

We have encountered the following issue:

With Adobe Acrobat Pro users can create password protected file attachments in PDF files without having to password protect the root document itself.

image-20240321-164233.png (55.0 KB)

When opening such PDF file with Aspose.Pdf an exception is thrown saying “encrypted PDF” whereas the expected behavior would be that the root document can be processed without any issue and only when the password protected file attachment is accessed would the password be required.

Can you please clarify if this is an expected behavior or a bug?
If it is the former, then please advise on how to handle such PDF files.

@zpopswat
A somewhat unusual case. Please attach such a document (which has a password-protected attachment, but the document itself is not password-protected) so that I can check this and, if necessary, create a task to the development team.

Please find the document uploaded below.
The password to the internal attachment is “password”. The root document itself is unprotected/unencrypted.

encrypted_file_attachment_password_is_password.pdf (19.8 KB)

Screenshot of the password setup is:

Selection_072_1.png (45.2 KB)

@zpopswat
Thank you for providing the case and the document to reproduce it. This is a flaw in the library and I will create a task for the development team.

@zpopswat
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): PDFNET-56956

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.