Skip Menu |

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

Report information
The Basics
Id: 51250
Status: open
Priority: 0/
Queue: CAM-PDF

People
Owner: Nobody in particular
Requestors: frickson [...] gibbon.com
Cc:
AdminCc:

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



Subject: Problem with appendPDF
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
Subject: sample.zip
Download sample.zip
application/zip 244.7k

Message body not shown because it is not plain text.

Subject: Re: [rt.cpan.org #51250] Problem with appendPDF
Date: Mon, 9 Nov 2009 18:32:19 -0600
To: bug-CAM-PDF [...] rt.cpan.org
From: Chris Dolan <chris [...] chrisdolan.net>
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>
Unfortunately, Haru doesn't seem to be very active. The last release was in 2006. But I was able to concatenate my files using gs. And Adobe can read the individual files just fine. It just has a problem with the concatenated output from CAM::PDF.
On Tue Nov 24 02:55:28 2009, frickson wrote: Show quoted text
> Unfortunately, Haru doesn't seem to be very active. The last release was > in 2006. > > But I was able to concatenate my files using gs. And Adobe can read the > individual files just fine. It just has a problem with the concatenated > output from CAM::PDF.
The latest vesion (2.1.0) is available at http://libharu.org/wiki/Downloads