Implement a Trigger under Windows with TCP/IP
These instructions use a separator page which adds the trigger to any job going through a specific text-only printer queue. This is useful in the case of legacy software or systems that can only print through text-based printers and where no control is possible over the contents of the job file.
Step 1 - Create a printer queue
Windows 2000/XP/2003
- Click Start, then Printers and Faxes. Alternatively, this location can be found in the Control Panel.
- Double-click on Add Printer. Click Next on the first page of the Add Printer Wizard.
- Keep the Local printer attached to this computer option but uncheck the automatically detect and install my Plug and Play printer box, then click Next.
- Select Create a new port , then select the StandardTCP/IP Port option. Click Next.
- Click Next in the new wizard dialog.
- Type in the printer's IP address or network name (for example, 192.168.100.213 or 10.0.0.163) then click Next (the Port Name will fill itself).
- Leave the Device Type to Generic Network Card, then click Next and Finish.
- Select the Generic manufacturer and the Generic / Text Only printer.
- Enter a printer name. This printer can be local only or shared on a network and will be unique to the document it triggers.
- If the printer is to be shared on the network, enter a Share name, then click Next.
- Select whether you want to print a test page, then click Next, then Finish.
Windows Vista/7
- Click Start, then Devices and Printers.
- Click on Add a printer
- Click on Add a local printer
- Select Create a new port , then select the StandardTCP/IP Port option. Click Next.
- Type in the printer's IP address or network name (for example, 192.168.100.213 or 10.0.0.163) then click Next (the Port Name will fill itself).
- Wait for the TCP/IP port detection to finish, leave the Device Type to Generic Network Card, then click Next.
- Select the Generic manufacturer and the Generic / Text Only printer.
- Enter a printer name. This printer can be local only or shared on a network and will be unique to the document it triggers.
- If the printer is to be shared on the network, enter a Share name, then click Next.
- Check if you want to set the printer as default on the system, then click Finish when you're done.
Step 2 - Create a separator page
The separator page feature in Windows is generally used to add a page containing text between print jobs, often to identify them. Because the separator page is sent as-is to the printer, however, even printer commands such as postscript will be executed on the printer. Separator pages are the same for all versions of Windows, but selecting them is slightly different.
- Open Notepad by clicking Start, Run, typing notepad.exe and clicking OK.
- Enter the following 2 lines in the Notepad window:
\N
\FSEPARATOR.TRG
- Go in the File menu then click Save. The name of the file should be SEPARATOR.SEP , and its location should be in C:\WINDOWS\SYSTEM32\
- Create a new file by going in File, New.
- Enter the following 2 lines:
%!PS-Adobe
(MYFORM) run MYFORM
- Save the file as SEPARATOR.TRG , also in C:\WINDOWS\SYSTEM32\
In the previous instructions, change both the trigger name (MYFORM) as well as a unique name for the SEP and TRG file names, especially if you intend to have more than one. Once this is done, follow these instructions to add the trigger to any job printed through the chosen printer:
- Right-click on the printer that was just created and click Properties in Windows 2000/XP/2003 , or Printer Properties in Windows Vista/7/2008.
- In the Advanced tab, click Separator Page
- Click Browse and browse to C:\WINDOWS\SYSTEM32\. Open the SEPARATOR.SEP file and OK.