I have discovered that an attempt to alter metadata in an encrypted PDF can result in an unreadable file.
It would be really nice to have a way to know beforehand that the file is encrypted, even if other encryption features are not implemented. Then I could avoid damaging the file.
I can see that the file in question has encryption: pdfinfo gives
It looks like the Info object might have a member Encrypt ... but with this file, it's not set.
If it were simply set when the file is encrypted, that would help!
I have discovered that an attempt to alter metadata in an encrypted PDF can result in an unreadable file. It would be really nice to have a way to know beforehand that the file is encrypted, even if other encryption features are not implemented. Then I could avoid damaging the file.
I can see that the file in question has encryption: pdfinfo gives
It looks like the
Info
object might have a memberEncrypt
... but with this file, it's not set. If it were simply set when the file is encrypted, that would help!