[gs-bugs] [Bug 691507] New: Getting Ghostscript really silent requires (undocumented) "-q -sstdout=%sstderr" parameter

bugzilla-daemon at ghostscript.com bugzilla-daemon at ghostscript.com
Wed Jul 28 17:08:04 UTC 2010


           Summary: Getting Ghostscript really silent requires
                    (undocumented) "-q -sstdout=%sstderr" parameter
           Product: Ghostscript
           Version: 8.71
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P4
         Component: General
        AssignedTo: support at artifex.com
        ReportedBy: pipitas at googlemail.com
         QAContact: gs-bugs at ghostscript.com
   Estimated Hours: 0.0

Sometimes it is really required to have Ghostscript's error messages supressed
which go to stdout in case of no real output was created. This is especially
true if you want to write Ghostscript's successful results to stdout or to a

Consider this testcase (created on Windows):

C:\> echo.This is not a PDF file.>nopdf.txt
C:\> gswin32c.exe ^
         -q ^
         -dBATCH ^
         -dNOPAUSE ^
         -sDEVICE=jpeg ^
         -sOutputFile=- ^
         - < nopdf.txt 2>nul 
  Error: /undefined in NotOperand stack:
  Execution stack:

To make Ghostscript really silent, one has to add '-sstdout=%sstderr' to the
commandline parameters:

C:\> gswin32c.exe ^
         -q ^
         -sstdout=%sstderr ^
         -dBATCH ^
         -dNOPAUSE ^
         -sDEVICE=jpeg ^
         -sOutputFile=- ^
         - < nopdf.txt 2>nul 

The addition of '-sstdout=%sstderr' allows Postscript stdout to be redirected,
while still allowing drivers to write to stdout. (That patch is in Ghostscript
since ~2001, Sept 22.) 

However, while some documentation about '-sstdout=...' is in Use.htm this hint
is not contained.

Please consider adding a sentence to Use.htm which makes it abundantly clear
how to completely silence Ghostscript in the described case. Merely using "-q"
is not sufficient for this.

Configure bugmail: http://bugs.ghostscript.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

More information about the gs-bugs mailing list