pdf-raku/PDF-raku

Failing to locate trailer in http://www.stillhq.com/pdfdb/000049/data.pdf

Closed this issue · 1 comments

From the PDF Test Database. Looks valid to me.

 perl6 -I. bin/pdf-rewriter.pl --/repair /home/david/Documents/test-pdf/000049.pdf /tmp/out.pdf
opening /home/david/Documents/test-pdf/000049.pdf ...
Expected file trailer 'startxref ... %%EOF', got: "btype /Form  /FormType 1 /BBox [ ...                     "
  in method load-index at /home/david/git/PDF-p6/lib/PDF/Reader.pm (PDF::Reader) line 546
  in method load-cos at /home/david/git/PDF-p6/lib/PDF/Reader.pm (PDF::Reader) line 432
  in method open at /home/david/git/PDF-p6/lib/PDF/Reader.pm (PDF::Reader) line 243
  in method open at /home/david/git/PDF-p6/lib/PDF/Reader.pm (PDF::Reader) line 175
  in sub MAIN at bin/pdf-rewriter.pl line 29
  in block <unit> at bin/pdf-rewriter.pl line 7

doh was looking at 000048.pdf. Error is legit. There's illegal spaces at the end of the PDF - phew.