summaryrefslogtreecommitdiff
path: root/sys/lib
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2015-02-19 11:44:16 +0100
committercinap_lenrek <cinap_lenrek@felloff.net>2015-02-19 11:44:16 +0100
commit13508a99a8955b98609ec7dcbf5f57069179a4de (patch)
tree133d1f7b802a9d85f1d886bb9d37faa00f3f7d16 /sys/lib
parent581f3852fe94949ab53b876d35ce2361240d6862 (diff)
gs: work arround broken xref table pdfs
rebuilding the xref table does not work for pdfs with compressed object streams. as a work arround, we skip xref table verification and ignore wrong xref gen # for gen 0 objects.
Diffstat (limited to 'sys/lib')
-rw-r--r--sys/lib/ghostscript/pdf_base.ps7
-rw-r--r--sys/lib/ghostscript/pdf_main.ps2
2 files changed, 5 insertions, 4 deletions
diff --git a/sys/lib/ghostscript/pdf_base.ps b/sys/lib/ghostscript/pdf_base.ps
index 710e15c79..438762cfb 100644
--- a/sys/lib/ghostscript/pdf_base.ps
+++ b/sys/lib/ghostscript/pdf_base.ps
@@ -412,11 +412,10 @@ pdfdict begin
( **** Warning: wrong generation: )
} ifelse
2 index =string cvs concatstrings ( ) concatstrings % put obj #
- exch =string cvs concatstrings ( R\n) concatstrings % put gen #
+ 1 index =string cvs concatstrings ( R\n) concatstrings % put gen #
pdfformaterror % Output warning message
- } { % Else QUIET ...
- pop % Pop generation umber
- } ifelse false % Return false if gen # not match
+ } if
+ 0 eq
} ifelse
} bind def
/R { % <object#> <generation#> R <object>
diff --git a/sys/lib/ghostscript/pdf_main.ps b/sys/lib/ghostscript/pdf_main.ps
index c4c352085..12ee8e6fc 100644
--- a/sys/lib/ghostscript/pdf_main.ps
+++ b/sys/lib/ghostscript/pdf_main.ps
@@ -25,6 +25,8 @@ pdfdict begin
% Patch in an obsolete variable used by some third-party software.
/#? false def
+/NoVerifyXref true def
+
% Test whether the current output device handles pdfmark.
/.writepdfmarkdict 1 dict dup /pdfmark null put readonly def
/.writepdfmarks { % - .writepdfmarks <bool>