diff options
author | Alex Cherepanov <alex.cherepanov@artifex.com> | 2012-04-24 17:35:10 -0400 |
---|---|---|
committer | Alex Cherepanov <alex.cherepanov@artifex.com> | 2012-04-24 17:35:10 -0400 |
commit | f1830075608195e2976751303d220fda3f796abb (patch) | |
tree | 5a198d9707433f6241c711de9fc88306e398d1ac | |
parent | 430e9e345c84912f953161aa843b37f235c97708 (diff) |
Bug 692969: Don't verify PDF 1.5 xref.
Don't verify stream xref table because we cannot repair PDF files with
new object format. Such verification only increases the chance that the
file fails.
-rw-r--r-- | gs/Resource/Init/pdf_main.ps | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gs/Resource/Init/pdf_main.ps b/gs/Resource/Init/pdf_main.ps index 84fa12c4a..46fc0fa91 100644 --- a/gs/Resource/Init/pdf_main.ps +++ b/gs/Resource/Init/pdf_main.ps @@ -588,6 +588,7 @@ currentdict /xref-char-dict undef % In PDF 1.5, the XRef dictionary also serves as the trailer dictionary /readpdf15xref % <pos> readpdf15xref <trailerdict> { + /Classic-xref //false store PDFfile exch setfileposition % move to start of object % Get object number, revision, and 'obj' and discard PDFfile token pop pop @@ -916,6 +917,7 @@ currentdict /xref-char-dict undef ifelse } loop + /Classic-xref //true def /PDFversion exch def % Read the last cross-reference table. count /pdfemptycount exch def @@ -930,7 +932,10 @@ currentdict /xref-char-dict undef % is not defined. Trailer { /Prev knownoget not { % If no previous xref table then ... - /NoVerifyXref where { pop } { verify_xref } ifelse exit + Classic-xref { + /NoVerifyXref where { pop } { verify_xref } ifelse + } if + exit } if { readxref } .internalstopped { recover_xref_data % Read failed. Attempt to recover xref data. |