Skip Menu |
 

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

Report information
The Basics
Id: 15184
Status: resolved
Priority: 0/
Queue: PDF-API2

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

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



Subject: $pdf->pages returns incorrect value
Download (untitled) / with headers
text/plain 451b
The attached PDF file has 5 pages. The "pages" function of PDF::API2 however returns the value 6. Distribution file name: PDF-API2-0.46.003.tar.gz Revision: 1.83 Perl version: v5.8.4 built for sun4-solaris OS: SunOS 5.8 Code for reproducing the bug: #! /usr/local/bin/perl use PDF::API2; my $file = shift or die "No file name given\n"; my $PDFfile = PDF::API2->open($file); print $PDFfile->pages, "\n"; Thank you in advance for taking care of this!
Download bug1.pdf
application/pdf 2.4m

Message body not shown because it is not plain text.

Download (untitled) / with headers
text/plain 532b
previous editions of the pdf-spec required the files startxref tag to be within the last 1024 characters of the file. you file has 2 such tags within this boundary. the latest pdf-spec requires the startxref tag immediately prior to the files end-of-file marker which leaves no room for trailing comments which are generaed by some real world applications. i have changed the search boundary to 64 bytes, which reads your file correctly and is unlikely to break older files. the fixes are available with PDF-API2-0.48 on CPAN.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.