Open superflexible opened 9 months ago
Apparently it is encrypted but without a password or something like that?
Can a workaround somehow be found?
Hi Tobias. Yes it is encrypted (to limit copy permissions) even though no password is required. And unfortunately decryption isn't currently supported because it adds a whole new level of complexity. Nevertheless I've just updated the repository so we're a bit closer to accomplishing this, but there's still quite a way to go. And unfortunately for you, I'm very tied up with another project. Of course you're welcome to contribute decrypt code (since I've mostly covered the PDF specific stuff) but I won't be spending much time on this myself any time soon. Sorry to disappoint.
Hi Angus, no problem at all, thanks for the information! Maybe I'll have a go at decryption. I worked with AES256 a lot, but of course it would add dependency on another library, or maybe something that ships with Delphi.
worked with AES256 a lot, but of course it would add dependency on another library, or maybe something that ships with Delphi.
The following code seems to have a very permissive license 😜: https://github.com/stijnsanders/tools/blob/master/crypto/aes.pas
Edit: And adding Cipher Block Chaining that's also needed shouldn't be too difficult.
See also Encryption (Section 3.5) in the PDF Reference Doc.
Example.pdf Hello, many thanks for providing this code!
I have a few PDF files that throw a decompression error, although the files are valid and can be viewed fine. I don't think they are encrypted.
I am attaching an example.
Do you think it can be fixed?
Many thanks. Tobias