This web page provides step by step instructions on how to create a virtual Postscript printer under Windows XP. The actual output device is any printer you might own or specify. That is, a printer will be created under Windows XP that will act like a Postscript printer and output to almost any non-Postscript windows printer. This procedure has been tested under Windows 98, 2000 & XP and should work on all modern Windows versions (though the steps are for setting this up under Windows 98 vary significantly).
Why would you want to do this? There are a variety of uses for this, four of them are:
As always, there are often other ways of accomplishing the above objectives. This page describes how to create a virtual Postscript printer to accomplish the above goals.
This process through which this works is as follows:
Postscript → Virtual Postscript Printer → RedMon → Ghostscript → GS mswinpr2 device → Physical Printer
These instruction presume familiarity with installing software and setting up printers. We do not show how to configure the remote Linux or Macintosh side of the printer setup (if this is the goal), though note that when printing from remote systems we need to print to the virtual Postscript printer, not the physical printer. If thisconceptuallydoes not make sense, it is better that you not attempt this procedure. Note that the Physical Printer can be a network printer, though detailed instructions for this scenario have not yet been added to this page.
The steps required to get this to work are:
The first step is to download the Ghostscript and RedMon (Redirection Port Monitor) software package. A companion package called GSview is not needed, but GSview is a nice graphical interface to Ghostscript. At the time of this writing the Ghostscript package was at version 8.14 and the GSview package was at version 4.6. Click here and download the latest version of these packages. At the time of this writing they are gs814w32.exe (needed) redmon17.zip (needed, click to download) and gsv46w32.exe (optional).
Synopsis: We install Ghostscript to the folder c:\gs (note the version number). We install RedMon to c:\gs\redmon and optionally we install GSview.
Install Ghostscript (gs814w32.exe) to any location of your choosing. The instructions presume to default location of c:\gs. Make sure you install the fonts.
Optionally install GSview (gsv46w32.exe).
Extract redmon17.zip to c:\gs\redmon (location is not important) and double click on setup.exe to actually install the Redirection Port Monitor. Do not delete the C:\gs\redmon folder! If you need a utility to extract ZIP files I recommend IZArc (freeware).
Synopsis: We setup the physical printer device by sharing is as gsprinter and we turn off print spooling for the printer.
Identify or create and setup the physical printer which will print the Postscript file. If the printer is not already shared, share the printer using the share name gsprinter (the existing or any other share name is fine).
The above shows the shared setup for a HP Laserjet 5P printer named HP Laserjet 5P (GS). We created this printer with a (GS) designation since we wanted a specific printer to handle the Postscript output. The reason for creating a separate printer for the Postscript output has to do with the next setting.
For some printers we need to set the Print directly to the printer option. Everything should work without this option, but for some printers the printing will be very slow without enabling this option. Since enabling direct printing may have undesirable side effects when printing from Windows programs, we create a printer dedicated to Postscript printing. Once the setup is completed I suggest you experiment with this setting. If your printer/system does not require the Print directly to the printer then creating and setting up a separate printer for Postscript is unnecessary.
Synopsis: We create a color Postscript printer and associate it to a newly created RPT1: port.
Using the Add a printer Wizard we add our virtual Postscript printer.
Select a Local printer attached to this computer option (the virtual printer will act like a local printer)
and select Create a new port and choose Redirected Port as the Type of Port.
- Do not choose the FILE: or any other port here!
- If you are using Windows XP/2000 and you do not have a Redirected Port as an option then the installation of RedMon (above) failed. You cannot continue until RedMon is properly installed.
- Windows 98 will not list a redirected port here. For Windows 98 first select the printer (HP Color LaserJet PS) and then select FILE: as the port. After creating the printer, add the RPT1: printer port under the Details tab of the printer properties. The process is similar to these steps, but make sure to configure the printer and the port as described below.
- The Windows 2000 screen looks significantly different then the XP screen shown above. The functionality remains the same.
Click on Next and
accept the default Port Name of RPT1: (or RPT2:, etc.) by clicking OK. Now select the default printer to associate with this port.
Select the HP printer HP Color Laserjet 4550 PS. This is the virtual printer we are creating so even if you do not own this printer select this choice. Certain other (but not all) printer selection will work here. Important is that printer be a color Postscript printer. Some printers seem to give better font quality output then others. I have had good success with this one. Under Windows 2000 select the HP C LaserJet 4500-PS printer. Click on Next until you must name your printer:
Name the printer GS PS Printer (or anything else that suits your fancy) and you probably do not want it to be your default printer. Click on Next and Next again on the Printer Sharing page until you reach the Print Test Page dialog box:
Make sure you do not print a test page. Click on Next and then Finish to actually install the printer.
This printer will become our virtual Postscript printer. We can share it and print to it from other systems including Linux and Macinistosh. The Linux system can be configured to print to a HP LaserJet 4050 Postscript printer or simply a Raw Print Queue.
Synopsis: We create the Ghostscript Options file mswinpr2.txt to configure the mswinpr2 device driver.
Now we need to create an options file c:\gs\mswinpr2.txt using a plain text editor such as Notepad. The file will tell Ghostscript that we want to print the Postscript file using the mswinpr2 printer device driver. The mswinpr2.txt file contents are:-Ic:\gs\gs8.14\lib;c:\gs\fonts -sDEVICE=mswinpr2 -dNoCancel -dNOPAUSE -dSAFER -sPAPERSIZE=letter
Alternatively download the above mswinpr2.txt file from here and place the file into the GhostScript directory c:\gs. Note that the path (the first line) must be correct for the version of Ghostscript you installed. Change the 8.14 to whatever version number you noted when you installed Ghostscript. European users should change the paper size from letter to a4. For more information on GhostScript devices and their options see here: http://www.cs.wisc.edu/~ghost/doc/cvs/Devices.htm.
Note: If your path names contains spaces you will need to put quotes around the paths specification C:\gs\gs8.14\lib;C:\gs\fonts. Thanks to Jonathan Sefton for pointing this out.
Synopsis: Configure the newly created RPT1: port to use Ghostscript to use the mswinpr2 device driver.
Select Properties of the newly created GS PS Printer
Under the Ports tab the correct port (created above) should already be selected (RPT1: or higher). Click on Configure Port...:
and fill out the dialog box as shown above. Make sure the program path C:\gs\gs8.14\bin\gswin32c.exe points to the gswin32c.exe executable. Change version 8.14 in the path to match the version that was actually installed. Make sure the Arguments for this program are: as indicated above (listed here again for reference and easy cut-and-paste):
@c:\gs\mswinpr2.txt -sOutputFile="\\spool\gsprinter" -
Note the dash at the end of the line. The OutputFile points to the share name of the physical output device we setup above. In our example the share name is gsprinter. The path name after the @ points to the options file mswinpr2.txt we created above. The Output: needs to be Program handles output, the Printer: is irrelevant, and the Run: box should say Hidden. Click on OK when done.
Note: The Log File button can be useful for tracking down problem should the printer fail to work properly.
Note: There is no requirement that the physical printer be a local printer. It could be a network printer and we can use its Windows share name to print to it.
Note: Thanks to Stephane Hole for pointing out that one can send the output directly to the physical printer instead of the share name:
@c:\gs\mswinpr2.txt -sOutputFile="%printer%HP Laserjet 5P (GS)" -
where the string HP Laserjet 5P (GS) is the name of the physical printer we setup in the step Setup & Prepare the Physical Printer above. In general, this is probably a better solution for local printers than using a share name.
Note: If your path names contains spaces you will need to put quotes around the path C:\gs\mswinpr2.txt. Thanks Jonathan Sefton for pointing this out.
Synopsis: We need to edit the registry to to avoid a printer dialog box form opening every time we print.
Note:This step may not be necessary in all cases.
We need to edit the registry to make sure Ghostscript knows the printer exists. See here for a more detailed explanation. See following registry key needs to be added to the registry.REGEDIT4 [HKEY_USERS\.DEFAULT\Software\Microsoft\Windows NT\CurrentVersion\Devices] "gsprinter"="winspool,FILE:"
Note the gsprinter name in the registry key above. This name must match the shared printer name we reference in the OutputFile setting above. You can download the gsprinter.reg registry file here. Double click on it to add the above key to your registry. If you fail to do this you may have a dialog box open prompting you to select the physical printer to print to every time your print to the virtual GS PS Printer.
Note: This step may not be necessary under Windows 98.
Synopsis: Print a test page to verify everything is working.
Select the General tab from the GS PS Printer Properties page:
and select Print Test Page. If all goes well your physical printer will print a Postscript test page. Note: if the color is wrong (i.e. the black is not black), try removing all the Color Profiles in the Color Management tab of the GS PS Printer printer.
Please let me know if you successfully used these instructions to create a Ghostscript based Postscript printer. Email me at .
This page is Copyright 2004 by Henrik Schmiediche.