Using Ghostscript with RPM

Can I use Ghostscript with RPM Remote Print Manager® (RPM)?

Ghostscript is a PostScript interpreter. PostScript is the most common printer language and is supported by most laser printers from nearly every printer manufacturer. However, there are a number of printers, laser and inkjet both, that do not support PostScript; this is where Ghostscript becomes useful.

The most common reason to use Ghostscript is to convert a PostScript file to PDF. Ghostscript can also output other formats including graphics formats (PNG, JPEG, TIFF, etc.) and printer formats (PCL5, PXL, epson). The second most common reason to use Ghostscript is to print PostScript files to a printer that does not support it.

How to download Ghostscript

You'll need to do a web search such as:

You should be able to find instructions to download and install the software.

You will also need to review the license information which comes with Ghostscript to verify that your use will be in compliance with the copyright holder's terms. This is not something Brooks can help you with.

However, the rest of our instructions will assume you can use GhostScript with permission as intended.

Convert Postscript to PDF

  1. In Queue Settings, create a new Filter action.
  2. Next to Command, click Browse and locate gswin32.exe. For instance, at this writing it was located in C:\Program Files\gs\gs8.64\bin\.
  3. If you are using a filter action, the Arguments should be:
    -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=%n.pdf %s

    If you are using a filter transform, the Arguments would be slightly different:
    -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=%o %s

  4. Set the Working directory to the folder in which you want the PDF file to be saved. To eliminate many issues, this folder should be local.

Note that the %s, %o, and %n are variables (placeholders).  RPM will substitute those values with the appropriate values.  A complete list of available variables is found in the RPM manual under both Filter transforms (page 13) and Filter actions (page17).

Print Postscript to a non-Postscript printer

  1. In Queue Settings, create a new Filter action.
  2. Next to Command, click Browse and locate gswin32.exe. It may be located in C:\Program Files\gs\gs8.64\bin\.
  3. The Arguments should be:
    -dNOPAUSE -dBATCH -sDEVICE=mswinpr2 -sOutputFile="\\spool\<Printer Name>" "%s"

Substitute the name of the printer to which you want to print in place of <Printer Name>. This is the name found in the Printers folder.

Note: Certain situations may prevent gswin32 from completing successfully.  Each of the following methods have proven useful to resolve the problem at one time or another.  We suggest trying each method in the order it appears and testing each change until you find the first method that works.

  • The option -dBATCH tells gswin32 it is running as a batch and should exit when finished.  It has been added to these instructions.
  • Try adding the word 'quit' as the last argument to the command line.
  • Add an Append bytes transform to append the word quit to the end of the data file.  One customer reported this method corrupted PDF Documents when attempting to convert Color PostScript files.
  • Configure your Filter action or transform to terminate idle process after a few seconds.  This option will cause gswin32 to close, but it may not be finished with the conversion.

If you encounter any problems, enter the login credentials of the user you are logged on as and select Interact with Desktop. The next time a job is received, the Ghostscript window will be displayed where you can troubleshoot errors. Once resolved, remove the credentials.