diff options
author | Karl Berry <karl@freefriends.org> | 2014-07-15 22:51:58 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2014-07-15 22:51:58 +0000 |
commit | d71cd04a4c07d1cdaf85a7b7c2398022cc39beab (patch) | |
tree | bf207d12166fe38bcfe5563201fc200ca44b1487 /Master/texmf-dist/scripts/thumbpdf | |
parent | 0c2cd6670307af5a6efc0b04eec1bbaec7d9688e (diff) |
thumbpdf (15jul14)
git-svn-id: svn://tug.org/texlive/trunk@34621 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/scripts/thumbpdf')
-rwxr-xr-x | Master/texmf-dist/scripts/thumbpdf/thumbpdf.pl | 32 |
1 files changed, 24 insertions, 8 deletions
diff --git a/Master/texmf-dist/scripts/thumbpdf/thumbpdf.pl b/Master/texmf-dist/scripts/thumbpdf/thumbpdf.pl index 3b52e5dd62c..8bf4e0958aa 100755 --- a/Master/texmf-dist/scripts/thumbpdf/thumbpdf.pl +++ b/Master/texmf-dist/scripts/thumbpdf/thumbpdf.pl @@ -5,7 +5,7 @@ $^W=1; # turn warning on # # thumbpdf.pl # -# Copyright (C) 1999-2012 Heiko Oberdiek. +# Copyright (C) 1999-2014 Heiko Oberdiek. # # This work may be distributed and/or modified under the # conditions of the LaTeX Project Public License, either version 1.3 @@ -27,10 +27,10 @@ $^W=1; # turn warning on my $file = "thumbpdf.pl"; my $program = uc($&) if $file =~ /^\w+/; my $prj = 'thumbpdf'; -my $version = "3.15"; -my $date = "2012/04/18"; +my $version = "3.16"; +my $date = "2014/07/15"; my $author = "Heiko Oberdiek"; -my $copyright = "Copyright (c) 1999-2012 by $author."; +my $copyright = "Copyright (c) 1999-2014 by $author."; # # Reqirements: Perl5, Ghostscript # History: @@ -153,6 +153,9 @@ my $copyright = "Copyright (c) 1999-2012 by $author."; # 2012/04/09 v3.14 # 2012/04/18 v3.15 # * Option --version added. +# 2014/07/15 v3.16 +# * Patch for "thumbpdf.pl" by Norbert Preining because of +# pdfTeX 1.40.15 (TeX Live 2014). # ### program identification @@ -937,6 +940,16 @@ if ($::opt_makedata) $objno[$count] = $1; $getobjindex[$1] = $count; $objdict[$count] = ($2); # boolean (if $2 exists) + if (!$objdict[$count]) { + # check for << on thext line, new PDF-X/2014 + $_ = <PDF>; + if (/^<<$/) { + $objdict[$count] = 1; + $lineno++; + $_ = <PDF>; + $lineno++; + } + } my $stream = 0; print "* obj $objno[$count]" . (($objdict[$count]) ? " (dict)" : "") . @@ -944,18 +957,18 @@ if ($::opt_makedata) # get obj $objtext[$count] = ""; - while (<PDF>) + while ($_) { - $lineno++; - if ($objdict[$count]) { if (/^>>/) { last if /^>>\s+endobj$/; # obj without stream - # get stream $_ = <PDF>; $lineno++; + last if /^endobj$/; # obj without stream, new PDF-X/2014 + + # get stream /^stream$/ or die "$Error `stream' expected on line $lineno!\n"; print "* stream\n" if $::opt_debug; @@ -982,6 +995,9 @@ if ($::opt_makedata) last if /^endobj$/; } $objtext[$count] .= $_; + + $_ = <PDF>; + $lineno++; } $count++; } |