You want to use a specific printer setting from a program in Windows. This setting should not always be the default for other programs, but for this one program you want the printer to always behave a certain way. For example, you may want this program to always use Tray 2 for check printing.
You do this you need to create a “fake printer” that has your settings for this program.
The steps below are largely based on this older document; these steps have been updated and tested on Windows 7.
- Download and install the latest version of the following software:
- Set up the real printer with the necessary settings. If you just need everything to use the same defaults, you can re-use your existing printer; but, if you need a special configuration (i.e. print to a specific tray), you’ll need to set up a new printer pointed at the same physical device and configured correctly for your needs.
- Create a new, local printer with a new port but select “Redirected Port” instead of local or network. Any Postscript driver should work; the “HP LaserJet 2300 Series PS” was used for this example. This will be the “fake” printer that your software will print to so name it something reasonable.
- Edit the new printer’s properties, switch to the Ports tab, select the Redirected Port (RPT1 in this case) and click “Configure Port”.
- In the port properties, enter the path to gswin64c.exe (or gswin32c.exe if on a 32-bit machine) in the “Redirect this port to the program” field. In the arguments field, enter the following:
-sOutputFile=”%printer%real printer” -sDEVICE=mswinpr2 –Note the dash at the end of that line; that is required. You’ll want to replace real printer with the actual name of the printer you want to use.You’ll also want to set it to run hidden; otherwise, a blank window will open every time something prints to the “fake” printer
- Save the port config and print a test page to verify everything is working.