summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Cherepanov <alex.cherepanov@artifex.com>2011-06-27 14:06:27 -0400
committerAlex Cherepanov <alex.cherepanov@artifex.com>2011-06-27 14:09:52 -0400
commit2f08f6f0c1b9bae95387534617005df0b4b7e46f (patch)
tree47ddc08063dc6784351bc5bb5e432527ae4fbede
parent9b9d97a5a2c299595048c72fa10e1a2b2845ff58 (diff)
Add -dPDFNOSTOPPED option.
Norrmally, PDF interpreter tries to repair all problems in PDF files. -dPDFNOSTOPPED option skips some of the stopped contexts. On error, instead of printing a warning and continue, PDF interpreter drops into a PostScript error handler that prints detailed information about the problem and kills the job.
-rw-r--r--gs/Resource/Init/gs_init.ps2
-rw-r--r--gs/Resource/Init/pdf_base.ps3
-rw-r--r--gs/doc/Use.htm8
3 files changed, 12 insertions, 1 deletions
diff --git a/gs/Resource/Init/gs_init.ps b/gs/Resource/Init/gs_init.ps
index da36842e9..9da974e32 100644
--- a/gs/Resource/Init/gs_init.ps
+++ b/gs/Resource/Init/gs_init.ps
@@ -112,6 +112,8 @@ currentdict /PDFSTEP known /PDFSTEP exch def
% if PDFSTEP is on, turn on PDFDEBUG
PDFSTEP { /PDFDEBUG //true def } if
+currentdict /PDFNOSTOPPED known /PDFNOSTOPPED exch def
+
/VMDEBUG
INITDEBUG {{print mark
systemdict /level2dict known
diff --git a/gs/Resource/Init/pdf_base.ps b/gs/Resource/Init/pdf_base.ps
index 2547c5670..0e40eff93 100644
--- a/gs/Resource/Init/pdf_base.ps
+++ b/gs/Resource/Init/pdf_base.ps
@@ -217,7 +217,8 @@ pdfdict begin
}
aload pop .packtomark cvx % file [ {cnt <<>> file ... }
{ loop } 0 get 2 packedarray cvx % file [ { {cnt <<>> file ... } loop }
- { stopped } 0 get % file [ { {cnt <<>> file ... } loop } stopped
+ PDFNOSTOPPED { {exec //false} } { {stopped} } ifelse
+ aload pop % file [ { {cnt <<>> file ... } loop } stopped
/PDFScanRules .getuserparam //null eq {
//PDFScanRules_null { setuserparams } 0 get % reset PDF scannig mode if it was off
} if
diff --git a/gs/doc/Use.htm b/gs/doc/Use.htm
index adfcd3159..cbff50975 100644
--- a/gs/doc/Use.htm
+++ b/gs/doc/Use.htm
@@ -3034,6 +3034,14 @@ needed to investigate particular areas. For backward compatibilty, the
<tr><td><code>-dVJPGDEBUG</code><td><td>ViewJPEG
</table>
+<p>
+Normally, PDF interpreter tries to repair all problems in PDF files.
+<code>-dPDFNOSTOPPED</code> skips some of the stopped contexts. On error,
+instead of printing a warning and continue, PDF interpreter drops into
+a PostScript error handler that prints detailed information about the problem and
+kills the job.
+</p>
+
<p>With switching to freetype 2 as the default font renderer in April 2010, we
added a new switch:<code>-dDisableFAPI=true</code> to revert to the older
behavior, just in case serious regression happens that cannot be resolved in a timely manner.</p>