From 6d1bde2bad1afeb610735f7ea53cabd7d3120fbe Mon Sep 17 00:00:00 2001 From: Ken Sharp Date: Thu, 16 Apr 2015 15:26:20 +0100 Subject: PDF interpreter - additional debugging option Added a 'stdoutprint' to go along with stderrprint, this allows us to have the 'pdfformaterror' and other informative messages sent to stdout instead of stderr. When capturing stdout and stderr for debugging purposes it can be useful to have the logging/debug messages go to the same place as the error messages in order that they are captured properly 'interleaved'. --- gs/Resource/Init/pdf_main.ps | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gs/Resource/Init/pdf_main.ps b/gs/Resource/Init/pdf_main.ps index f4eafd940..cc775f2b7 100644 --- a/gs/Resource/Init/pdf_main.ps +++ b/gs/Resource/Init/pdf_main.ps @@ -1107,11 +1107,16 @@ currentdict /xref-char-dict undef } bind def /stderrfile (%stderr) (w) file def +/stdoutfile (%stdout) (w) file def /stderrprint { % stderrprint - //stderrfile dup 3 -1 roll writestring flushfile } bind def +/stdoutprint { % stderrprint - + //stdoutfile dup 3 -1 roll writestring flushfile +} bind def + /pdfformaterror { % pdfformaterror - stderrprint /Repaired //true store -- cgit v1.2.1