From d71cd04a4c07d1cdaf85a7b7c2398022cc39beab Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 15 Jul 2014 22:51:58 +0000 Subject: thumbpdf (15jul14) git-svn-id: svn://tug.org/texlive/trunk@34621 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/scripts/thumbpdf/thumbpdf.pl | 32 +++++++++++++++++++------- 1 file changed, 24 insertions(+), 8 deletions(-) (limited to 'Master/texmf-dist/scripts') 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 + $_ = ; + if (/^<<$/) { + $objdict[$count] = 1; + $lineno++; + $_ = ; + $lineno++; + } + } my $stream = 0; print "* obj $objno[$count]" . (($objdict[$count]) ? " (dict)" : "") . @@ -944,18 +957,18 @@ if ($::opt_makedata) # get obj $objtext[$count] = ""; - while () + while ($_) { - $lineno++; - if ($objdict[$count]) { if (/^>>/) { last if /^>>\s+endobj$/; # obj without stream - # get stream $_ = ; $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] .= $_; + + $_ = ; + $lineno++; } $count++; } -- cgit v1.2.3