From fda5435ca272bab86872d2627667b5b259eb5423 Mon Sep 17 00:00:00 2001 From: Reinhard Kotucha Date: Thu, 5 Oct 2017 20:49:39 +0000 Subject: Upgrade gs-9.21 -> gs-9.22 git-svn-id: svn://tug.org/texlive/trunk@45477 c570f23f-e606-0410-a88d-b1316a301751 --- Master/tlpkg/tlgs/Resource/Init/pdf_base.ps | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) (limited to 'Master/tlpkg/tlgs/Resource/Init/pdf_base.ps') diff --git a/Master/tlpkg/tlgs/Resource/Init/pdf_base.ps b/Master/tlpkg/tlgs/Resource/Init/pdf_base.ps index bdfe9ee8feb..f2ae2dec3ef 100644 --- a/Master/tlpkg/tlgs/Resource/Init/pdf_base.ps +++ b/Master/tlpkg/tlgs/Resource/Init/pdf_base.ps @@ -774,6 +774,11 @@ currentdict /no_debug_dict undef % When resolving an object reference, we stop at the endobj or endstream. /resolveopdict mark valueopdict { } forall + /xref { % Bug 697761 + ( **** Error: Encountered 'xref' while expecting 'endobj'.\n) pdfformaterror + ( Treating this as a missing 'endobj', output may be incorrect.\n) pdfformaterror + endobj exit + } bind /endstream { endobj exit } bind /endobj { endobj exit } bind /endjobj { % Bug 689876. @@ -786,9 +791,13 @@ currentdict /no_debug_dict undef ( Output may be incorrect.\n) pdfformaterror endobj exit } bind + /obj { % OmniForm generates PDF file with endobj missing in some % objects. AR ignores this. So we have to do it too. - /obj { pop pop endobj exit } bind + ( **** Error: Encountered 'obj' while expecting 'endobj'.\n) pdfformaterror + ( Treating this as a missing 'endobj', output may be incorrect.\n) pdfformaterror + pop pop endobj exit + } bind .dicttomark readonly def /resolveR { % resolveR @@ -849,12 +858,13 @@ currentdict /no_debug_dict undef dup type /dicttype eq % For dictionaries only { - dup /Type .knownget % make sure the dictionary has a type + dup /Type known % make sure the dictionary has a type { - dup /Font eq exch /FontDescriptor eq or % and ensure its a Font or FontDescriptor - {dup 3 -1 roll /.gs.pdfobj# exch put} - {exch pop} - ifelse + %% We must not add to *all* dictionaries, because some of them are handled by + %% executing all the key/value pairs, and adding a integer causes problems + %% Since we only use this number for font identification, or checking self-references, + %% we only need it for dictionaries with a Type, and these are always handled more carefully. + dup 3 -1 roll /.gs.pdfobj# exch put } {exch pop} ifelse @@ -889,11 +899,6 @@ currentdict /no_debug_dict undef % may have preceded the EOL, such as spaces or tabs. Thus we back up one % character and scan until we find the \n terminator. /stream { % stream - dup /Length knownoget { - 0 eq { - dup /Filter undef % don't confuse any filters that require data - } if - } if dup /F known dup PDFsource PDFfile eq or { not { dup /File PDFfile put -- cgit v1.2.3