CAM::PDF iterates over the pages to save them. If the second page is
corrupt as you say, then it won't be able to process any pages after
that. If neither CAM::PDF nor Abobe can work with this file, then I'd
file a bug with Haru instead of with CAM::PDF.
Chris
On Nov 9, 2009, at 3:27 PM, John C. Frickson via RT wrote:
Show quoted text> Mon Nov 09 16:27:45 2009: Request 51250 was acted upon.
> Transaction: Ticket created by frickson
> Queue: CAM-PDF
> Subject: Problem with appendPDF
> Broken in: 1.52
> Severity: Critical
> Owner: Nobody
> Requestors: frickson@gibbon.com
> Status: new
> Ticket <URL:
https://rt.cpan.org/Ticket/Display.html?id=51250 >
>
>
> My company produces about 30 reports each month for a number of
> clients.
> Two of these reports, when concatenated using CAM-PDF result in a
> corrupt PDF file. All reports are created using the Haru Free PDF
> Library (
http://sourceforge.net/projects/libharu/).
>
> A simplified version of the perl script (concatpdf.pl) I call from the
> web to concatenate the reports is supplied in the attached zip.
>
> Running `./concatpdf.pl First.pdf Second.pdf > out.pdf` will result
> in a
> file where the report from First.pdf is fine, but only the first page
> from Second.pdf is valid. The remaining pages are corrupt and cannot
> be
> displayed.
>
> However, running `./concatpdf.pl Second.pdf First.pdf > out.pdf`
> results
> in a file that appears to be completely fine.
>
> I suspect it's something in the Haru library, because if I open
> Second.pdf in Adobe and save it, only the second page of the report
> from
> Second.pdf is corrupt; the remaining pages are fine.
>
> I either need this fixed in CAM-PDF, or need to know what the Haru
> library is doing wrong so I can patch it there.
>
> Using:
> CAM-PDF v1.52
> Haru Libarary v2.0.8
> Perl v5.8.8
> SLES 10 pl 2 for x86_64
> Linux kernel 2.6.16.60-0.30-smp
>
>
> <sample.zip>