Skip Menu |

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

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

Owner: Nobody in particular
Requestors: abhinavk [...]

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

Subject: PDF::API2 fails when xref section has spaces around object index and count.
Download (untitled) / with headers
text/plain 542b
For PDF files that have cross reference section as xref 0 91 # *spaces around obj index and count* 0000000000 65535 f 0000004265 00000 n 0000004160 00000 n 0000000009 00000 n 0000141765 00000 n PDF::API2 fails with malformed trailer error. When you modify the pdf file to remove the space like below, it works fine. instead of xref 0 91 0000000000 65535 f 0000004265 00000 n 0000004160 00000 n 0000000009 00000 n 0000141765 00000 n The producer application for the pdf was JAWS PDFLib and pdf version 1.3
Download (untitled) / with headers
text/plain 127b
attaching an example PDF (cannot post the original PDF due to company policies. I have created a new pdf with the same problem)
Subject: isc07cc.pdf
Download isc07cc.pdf
application/pdf 141.7k

Message body not shown because it is not plain text.

Download (untitled) / with headers
text/plain 222b
My workaround for the problem is PDF\API2\Basic\PDF\ 1266c1266 < while ($buf =~ m/^([0-9]+)$ws_char+([0-9]+)$cr(.*?)$/so) --- Show quoted text
> while ($buf =~
Download (untitled) / with headers
text/plain 338b
Thanks (rather belatedly) for the bug report and patch. Based on my reading of the PDF specification, extra spaces aren't allowed on that line. However, since the fix is unambiguous and doesn't add much overhead, I've added it anyway (with a warning so that the producer can be fixed). This change will be included in the next release.

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

Please report any issues with to