Skip Menu |
 

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

Report information
The Basics
Id: 120398
Status: new
Priority: 0/
Queue: Text-PDF

People
Owner: Nobody in particular
Requestors: 'spro^^*%*^6ut# [...] &$%*c
Cc:
AdminCc:

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



Subject: ‘trailer’ should not require a return
Download (untitled) / with headers
text/plain 297b
The PDF spec does not require the word ‘trailer’ to be followed by a return. This is syntactically valid: trailer<< /Size 34 /Root 23 0 R /Info 1 0 R /ID [ <e2ca9df8c15ea42d17d5d724f61808b1> <e2ca9df8c15ea42d17d5d724f61808b1> ] >> The attached patch fixes the module to allow such trailers.
Subject: open_7avjz48f.txt
Download open_7avjz48f.txt
text/plain 569b
--- /Users/sprout/.cpan/build/Text-PDF-0.31-rH_fyS/lib/Text/PDF/File.pm 2016-08-16 08:01:48.000000000 -0700 +++ lib/Text/PDF/File.pm 2017-02-26 14:54:42.000000000 -0800 @@ -1080,10 +1080,10 @@ { $xlist->{$xmin++} = [$1, $2, $3]; } } - if ($buf !~ /^trailer$cr/oi) + if ($buf !~ /^trailer$ws_char*/oi) { die "Malformed trailer in PDF file $self->{' fname'} at " . ($fh->tell - length($buf)); } - $buf =~ s/^trailer$cr//oi; + $buf =~ s/^trailer$ws_char*//oi; ($tdict, $buf) = $self->readval($buf); $tdict->{' loc'} = $xpos;


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.