Skip Menu |

This queue is for tickets about the CAM-PDF CPAN distribution.

Report information
The Basics
Id: 43144
Status: rejected
Priority: 0/
Queue: CAM-PDF

People
Owner: Nobody in particular
Requestors: Matthias.Belz [...] springer.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.52
Fixed in: (no value)



Subject: Parse error for linearized PDF
Hi, I have a number of linearized PDFs (PDF version is 1.3) that cannot be parsed by CAM::PDF. An example is available here: <http://devel.springer.de/example.pdf> Code to reproduce the error: use CAM::PDF; my $PDFfile = CAM::PDF->new('example.pdf'); The error reported is: substr outside of string at .../site/lib/CAM/PDF.pm line 716. Use of uninitialized value $content[11] in join or string at .../site/ lib/CAM/PDF.pm line 718. Expected object open tag 0 xref^M0 528^M0000000000 65535 f^M 00001134... The PDF file was originally created by Adobe InDesign CS2 and then linearized by Enfocus PitStop Server 08 Update 3. The error does not occur with the unlinearized PDF. More information that might be of relevance: CAM::PDF version: 1.52 Perl version: 5.10.0 OS: Windows XP Thanks, Matthias
From: dxnf8kmj9cbygr7 [...] temporaryinbox.com
AHA, jemand vom Springer Verlag. Text ohne viele Bilder lesen ist da wohl ein grossen Broblem? In der Beschreibung dieses Pakets steht: <<The file format through PDF 1.5 is well-supported, with the exception of the "linearized" or "optimized" output format, which this module can read but not write.>>
The anonymous poster, who ironically used the nickname "intelligent", was not only insulting, but also missed the point completely: According to the quoted description, CAM::PDF can read linearized PDF, while I have provided an example where reading linearized PDF fails.
This PDF file is corrupt. The linearized header says the main index starts at byte 434561 in the file but it really occurs at byte 434562 (that is, one byte later). I don't know where that extra one byte came from, but it's enough to render the file unreadable.
Thank you for the analysis! We confronted Enfocus with it and they admitted that it's an error on their end, which they will fix in their next release.