Skip Menu |

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

Report information
The Basics
Id: 26484
Status: resolved
Priority: 0/
Queue: CAM-PDF

People
Owner: Nobody in particular
Requestors: stefano.ruberti [...] iit.cnr.it
Cc:
AdminCc:

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



Subject: Problem with numPages()
Date: Thu, 19 Apr 2007 09:25:51 +0200
To: bug-CAM-PDF [...] rt.cpan.org
From: Stefano Ruberti <stefano.ruberti [...] iit.cnr.it>
Hi all, I've problem with numPages() function about some PDF. The patterm matching in the PDF.pm file does not recognize the %%EOF tag at the end of file. Below I have inserted some of rows of pdf with which I have the problem. This PDF is readable with the common pdf viewer. ======================================================================== ==== endstream^Mendobj^M14 0 obj 44^Mendobj^Mxref^M0 16^M0000000002 65535 f ^M0000000010 00000 n ^M0000000015 00000 f ^M0000000054 00000 n ^M0000000225 00000 n ^M0000000414 00000 n ^M0000000472 00000 n ^M0000000493 00000 n ^M0000045016 00000 n ^M0000045111 00000 n ^M0000045129 00000 n ^M0000045321 00000 n ^M0000045343 00000 n ^M0000085882 00000 n ^M0000085979 00000 n ^M0000000000 00000 f ^Mtrailer^M<</Size 16/Info 3 0 R/Root 1 0 R/ID [<426b4e2cddd40092805c4c26f7bc0975><cd24770220a794144810bdeb9f9aec89>] Show quoted text
>>^Mstartxref^M85998^M%%EOF^M%PaperPortPDFversion
======================================================================== ==== can You help me please. Best regards Stefano -- ---------- ----------- Stefano Ruberti E-Mail: stefano.ruberti@iit.cnr.it CNR - Istituto di Informatica e Telematica via G. Moruzzi, 1 Phone: +39 050 3152076 I-56124 PISA Fax: +39 050 3152593 Italy ---------- -----------
Subject: Re: [rt.cpan.org #26484] Problem with numPages()
Date: Thu, 19 Apr 2007 20:46:56 -0500
To: bug-CAM-PDF [...] rt.cpan.org
From: Chris Dolan <chris [...] chrisdolan.net>
Stefano, It looks to me like your PDF may have had its line endings converted incorrectly. Many of the mainstream PDF tools (Adobe, etc) auto- correct that corruption, but my library does not. But I can't tell for sure from the snippet you've included. Take a look at the byte size of your file. If the file size is 86487, then I'm mistaken. But if it's smaller by a thousand bytes or more, then I'm right. Chris On Apr 19, 2007, at 2:26 AM, stefano.ruberti@iit.cnr.it via RT wrote: Show quoted text
> > Thu Apr 19 03:26:17 2007: Request 26484 was acted upon. > Transaction: Ticket created by stefano.ruberti@iit.cnr.it > Queue: CAM-PDF > Subject: Problem with numPages() > Broken in: (no value) > Severity: (no value) > Owner: Nobody > Requestors: stefano.ruberti@iit.cnr.it > Status: new > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=26484 > > > > Hi all, > > I've problem with numPages() function about some PDF. > The patterm matching in the PDF.pm file does not recognize the %%EOF > tag at the end of file. > Below I have inserted some of rows of pdf with which I have the > problem. > This PDF is readable with the common pdf viewer. > > ====================================================================== > == > ==== > endstream^Mendobj^M14 0 obj 44^Mendobj^Mxref^M0 16^M0000000002 65535 > f ^M0000000010 00000 n ^M0000000015 00000 f ^M0000000054 00000 n > ^M0000000225 00000 n ^M0000000414 00000 n ^M0000000472 00000 n > ^M0000000493 00000 n ^M0000045016 00000 n ^M0000045111 00000 n > ^M0000045129 00000 n ^M0000045321 00000 n ^M0000045343 00000 n > ^M0000085882 00000 n ^M0000085979 00000 n ^M0000000000 00000 f > ^Mtrailer^M<</Size 16/Info 3 0 R/Root 1 0 R/ID > [<426b4e2cddd40092805c4c26f7bc0975><cd24770220a794144810bdeb9f9aec89>]
>>> ^Mstartxref^M85998^M%%EOF^M%PaperPortPDFversion
> ====================================================================== > == > ==== > > can You help me please. > > Best regards > > Stefano > > -- > ---------- > ----------- > Stefano Ruberti E-Mail: > stefano.ruberti@iit.cnr.it > CNR - Istituto di Informatica e Telematica > via G. Moruzzi, 1 Phone: +39 050 > 3152076 > I-56124 PISA Fax: +39 050 > 3152593 > Italy > ---------- > ----------- > > >
-- Chris Dolan, Equilibrious LLC, http://equilibrious.net/ Public key: http://chrisdolan.net/public.key vCard: http://chrisdolan.net/ChrisDolan.vcf
Subject: Re: [rt.cpan.org #26484] Problem with numPages()
Date: Fri, 20 Apr 2007 08:51:33 +0200
To: bug-CAM-PDF [...] rt.cpan.org
From: Stefano Ruberti <stefano.ruberti [...] iit.cnr.it>
Chris, I cannot send the PDF file to you for security reasons. Show quoted text
> ls -al
-rw-r--r-- 1 stefanor stefanor 86486 Apr 19 09:18 file.pdf The error message is: "Cannot find the index in the PDF content"; It's relative of pattern matching in teh PDF.pm file as yu can see below: # Start by parsing out the location of the last xref block my ($startxref) = $self->{content} =~ m/ startxref\s*(\d+)\s*%%EOF \s*\z /xms; if (!$startxref) { $CAM::PDF::errstr = "Cannot find the index in the PDF content\n"; return; } Best regards Stefano Il giorno 20/apr/07, alle ore 03:48, Chris Dolan via RT ha scritto: Show quoted text
> > <URL: http://rt.cpan.org/Ticket/Display.html?id=26484 > > > Stefano, > > It looks to me like your PDF may have had its line endings converted > incorrectly. Many of the mainstream PDF tools (Adobe, etc) auto- > correct that corruption, but my library does not. But I can't tell > for sure from the snippet you've included. > > Take a look at the byte size of your file. If the file size is > 86487, then I'm mistaken. But if it's smaller by a thousand bytes or > more, then I'm right. > > Chris > > On Apr 19, 2007, at 2:26 AM, stefano.ruberti@iit.cnr.it via RT wrote: >
>> >> Thu Apr 19 03:26:17 2007: Request 26484 was acted upon. >> Transaction: Ticket created by stefano.ruberti@iit.cnr.it >> Queue: CAM-PDF >> Subject: Problem with numPages() >> Broken in: (no value) >> Severity: (no value) >> Owner: Nobody >> Requestors: stefano.ruberti@iit.cnr.it >> Status: new >> Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=26484 > >> >> >> Hi all, >> >> I've problem with numPages() function about some PDF. >> The patterm matching in the PDF.pm file does not recognize the %%EOF >> tag at the end of file. >> Below I have inserted some of rows of pdf with which I have the >> problem. >> This PDF is readable with the common pdf viewer. >> >> ===================================================================== >> = >> == >> ==== >> endstream^Mendobj^M14 0 obj 44^Mendobj^Mxref^M0 16^M0000000002 65535 >> f ^M0000000010 00000 n ^M0000000015 00000 f ^M0000000054 00000 n >> ^M0000000225 00000 n ^M0000000414 00000 n ^M0000000472 00000 n >> ^M0000000493 00000 n ^M0000045016 00000 n ^M0000045111 00000 n >> ^M0000045129 00000 n ^M0000045321 00000 n ^M0000045343 00000 n >> ^M0000085882 00000 n ^M0000085979 00000 n ^M0000000000 00000 f >> ^Mtrailer^M<</Size 16/Info 3 0 R/Root 1 0 R/ID >> [<426b4e2cddd40092805c4c26f7bc0975><cd24770220a794144810bdeb9f9aec89> >> ]
>>>> ^Mstartxref^M85998^M%%EOF^M%PaperPortPDFversion
>> ===================================================================== >> = >> == >> ==== >> >> can You help me please. >> >> Best regards >> >> Stefano >> >> -- >> ---------- >> ----------- >> Stefano Ruberti E-Mail: >> stefano.ruberti@iit.cnr.it >> CNR - Istituto di Informatica e Telematica >> via G. Moruzzi, 1 Phone: +39 050 >> 3152076 >> I-56124 PISA Fax: +39 050 >> 3152593 >> Italy >> ---------- >> ----------- >> >> >>
> > -- > Chris Dolan, Equilibrious LLC, http://equilibrious.net/ > Public key: http://chrisdolan.net/public.key > vCard: http://chrisdolan.net/ChrisDolan.vcf > > > >
-- ---------- ----------- Stefano Ruberti E-Mail: stefano.ruberti@iit.cnr.it CNR - Istituto di Informatica e Telematica via G. Moruzzi, 1 Phone: +39 050 3152076 I-56124 PISA Fax: +39 050 3152593 Italy ---------- -----------
Subject: Re: [rt.cpan.org #26484] Problem with numPages()
Date: Fri, 20 Apr 2007 09:07:35 +0200
To: bug-CAM-PDF [...] rt.cpan.org
From: Stefano Ruberti <stefano.ruberti [...] iit.cnr.it>
Chirs, The other pdf file that manifest the same problem and that I can send you, I have attached to this mail. Stefano
Download booh.pdf
application/pdf 44k

Message body not shown because it is not plain text.

Il giorno 20/apr/07, alle ore 03:48, Chris Dolan via RT ha scritto: Show quoted text
> > <URL: http://rt.cpan.org/Ticket/Display.html?id=26484 > > > Stefano, > > It looks to me like your PDF may have had its line endings converted > incorrectly. Many of the mainstream PDF tools (Adobe, etc) auto- > correct that corruption, but my library does not. But I can't tell > for sure from the snippet you've included. > > Take a look at the byte size of your file. If the file size is > 86487, then I'm mistaken. But if it's smaller by a thousand bytes or > more, then I'm right. > > Chris > > On Apr 19, 2007, at 2:26 AM, stefano.ruberti@iit.cnr.it via RT wrote: >
>> >> Thu Apr 19 03:26:17 2007: Request 26484 was acted upon. >> Transaction: Ticket created by stefano.ruberti@iit.cnr.it >> Queue: CAM-PDF >> Subject: Problem with numPages() >> Broken in: (no value) >> Severity: (no value) >> Owner: Nobody >> Requestors: stefano.ruberti@iit.cnr.it >> Status: new >> Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=26484 > >> >> >> Hi all, >> >> I've problem with numPages() function about some PDF. >> The patterm matching in the PDF.pm file does not recognize the %%EOF >> tag at the end of file. >> Below I have inserted some of rows of pdf with which I have the >> problem. >> This PDF is readable with the common pdf viewer. >> >> ===================================================================== >> = >> == >> ==== >> endstream^Mendobj^M14 0 obj 44^Mendobj^Mxref^M0 16^M0000000002 65535 >> f ^M0000000010 00000 n ^M0000000015 00000 f ^M0000000054 00000 n >> ^M0000000225 00000 n ^M0000000414 00000 n ^M0000000472 00000 n >> ^M0000000493 00000 n ^M0000045016 00000 n ^M0000045111 00000 n >> ^M0000045129 00000 n ^M0000045321 00000 n ^M0000045343 00000 n >> ^M0000085882 00000 n ^M0000085979 00000 n ^M0000000000 00000 f >> ^Mtrailer^M<</Size 16/Info 3 0 R/Root 1 0 R/ID >> [<426b4e2cddd40092805c4c26f7bc0975><cd24770220a794144810bdeb9f9aec89> >> ]
>>>> ^Mstartxref^M85998^M%%EOF^M%PaperPortPDFversion
>> ===================================================================== >> = >> == >> ==== >> >> can You help me please. >> >> Best regards >> >> Stefano >> >> -- >> ---------- >> ----------- >> Stefano Ruberti E-Mail: >> stefano.ruberti@iit.cnr.it >> CNR - Istituto di Informatica e Telematica >> via G. Moruzzi, 1 Phone: +39 050 >> 3152076 >> I-56124 PISA Fax: +39 050 >> 3152593 >> Italy >> ---------- >> ----------- >> >> >>
> > -- > Chris Dolan, Equilibrious LLC, http://equilibrious.net/ > Public key: http://chrisdolan.net/public.key > vCard: http://chrisdolan.net/ChrisDolan.vcf > > > >
-- ---------- ----------- Stefano Ruberti E-Mail: stefano.ruberti@iit.cnr.it CNR - Istituto di Informatica e Telematica via G. Moruzzi, 1 Phone: +39 050 3152076 I-56124 PISA Fax: +39 050 3152593 Italy ---------- -----------
Better late than never... I believe this is solved in CAM::PDF 1.52, which supports compressed object streams that were introduced in Adobe PDF v1.5.