Subject: | Encrypted PDFs without an ID |
Date: | Thu, 9 Aug 2007 10:19:02 -0400 |
To: | <bug-CAM-PDF [...] rt.cpan.org> |
From: | "Peter Mark" <pmark [...] CartesianInc.com> |
Thank you for your excellent package.
Unfortunately, we have found that the package is unable to open encrypted
PDFs without an ID. Although most PDFs do have an ID, the specification says
that it is optional. And, it does not appear to make it required for
encrypted documents.
The EPO (ep.espacenet.com) distributes encrypted v1.2 PDFs without an ID.
These files are read by both Adobe and Apple PDF software without complaint.
The following simple change to CAM::PDF::Decrypt.pm appears to allow
decryption of these documents:
diff -r1.1 Decrypt.pm
127,129c127,130
< {
< $CAM::PDF::errstr = "This PDF lacks an ID. The document cannot
be decrypted.\n";
< return;
---
Show quoted text
> {
> $doc->{ID} = qq{};
Please consider it for a future release of the package.
Thanks again for the excellent package.
Best regards,
Peter Mark
Cartesian Products, Inc.