Subject: | PDF-Reuse 0.35 prDoc/xrefSection problem |
Date: | Tue, 19 May 2009 00:28:35 -0400 |
To: | bug-PDF-Reuse [...] rt.cpan.org |
From: | steve meister <steve [...] themeisters.net> |
Perl version: perl, v5.8.8 built for MSWin32-x86-multi-thread
OS: Microsoft Windows 2003 Server
Problem: crash using prDoc with some pdfs created with Xerox X-Solutions
ScanFlowStore
Solution: change xrefSection
move $buf contatination to beginning of while loop.
It looks like xrefSection is expecting a blank line which it can safely
ignore to follow the xref section before the trailer line, but the
ScanFlowStore software does not always include the blank line.
By moving the '$buf .=' line, the line used to break out of the xref
processing is scanned for the trailer information.
I have included a diff and a sample of the end of a pdf that causes a
problem.
Thank you
Steve Meister
diff
---
4402c4402,4403
< { if ($buf =~ m'Encrypt'o)
---
Show quoted text
> { $buf .= $inrad;
> if ($buf =~ m'Encrypt'o)
4421d4421
< $buf .= $inrad;
---
example of end of problem pdf
---
xref
0 1
0000000000 65535 f
2 1
0000079781 00000 n
8 1
0000079548 00000 n
trailer <</Size 14 /Info 8 0 R /Root 13 0 R /Prev 79172
/ID[<CF0951C793CEED6C6E66A1B3BCF4D456><CF0951C793CEED6C6E66A1B3BCF4D456>] >>
startxref
79851
%%EOF
---