empira / PDFsharp

PDFsharp and MigraDoc Foundation for .NET 6 and .NET Framework
https://docs.pdfsharp.net/
Other
531 stars 132 forks source link

Support Version 5 Revision 5 decryption #153

Closed Greybird closed 2 months ago

Greybird commented 3 months ago

This PR adds support for Version 5 Revision 5 encryption, which is proprietary from Adobe.

5 (PDF 2.0; deprecated) Shall not be used. This value was used by a deprecated proprietary Adobe extension

While it should not be used anymore in PDF2.0 compliant documents, users can still have some pdf that use this encryption option. As the change is quite small, it is probably interesting to support it.

Note that the test uses py-pdf files as I cannot share files from my company ; I suppose appropriate files should be provided through assets files download ?

martinossendorf commented 2 months ago

Thank you for the PR. We will include the ability of reading Version 5 Revision 5 encrypted files with the next release of PDFsharp 6.2.0.