7.2
Table Of Contents
- Copyright Information
- Table of Content
- Overview
- Capturing Data
- Sample Data File
- Spool File
- Capture Sample Data for a Document You Install on a Printer
- Capture Sample Data for a Document You Install in your PlanetPress Suite Work...
- Capture Sample Data in Windows NT
- Capture Sample Data in Windows 2000/Server 2003/XP
- Capture Sample Data in Windows Host Using a Novell Print Server
- Capture Sample Data in UNIX (Solaris)
- Capture Sample Data using an AS/400 Systems
- Capture Sample Data From a Serial Port
- Creating Triggers
- Trigger
- Trigger Syntax
- Techniques for Inserting Triggers
- Implement a Trigger under Novell 3.x
- Implement a Trigger under Novell 4.x and 5.x with NDS or Bindery Printers
- Implement a Trigger under Windows with TCP/IP
- Implement a Trigger under BSD Printing Systems (BSDi, FreeBSD, Linux)
- Implement a Trigger under UNIX System V (Solaris)
- Implement a Trigger and Configure an AIX 4.3 Printer
- Implement a Trigger under VMS
- Implement a Trigger with AS/400 Systems
- Prepare SAP Device Type for PlanetPress Design
- Implement a Trigger under HP 3000
- Special Printer Requirements
- ASCII Conversion Table
- CL Program for AS/400 Systems
- Index
disk of the printer. We name the script mailing.scr and place it in the spool directory.
3. Edit the input filter using a text editor. For example, to edit it in the vi text editor, we issue the command:
vi /var/spool/lpd/mailing.scr
Enter the following lines in the text editor:
#!/bin/sh
/bin/echo "%!PS-Adobe"
/bin/echo "(MAILING) run MAILING"
cat -
/bin/echo -e \004
The first echo turns the printer to PS mode. The second echo calls the document. Edit them to reflect the name and location of
your document. Enter all other lines exactly as shown above. Although the echo \004 is not required, it is recommended as it
signals the end of the job to the PostScript printer. Be sure you use the echo program, and not the command internal to your
shell. The echo internal to your shell might not support the escape characters the echo program supports. The echo program is
usually located in /bin.
4. Save your changes and exit the text editor.
5.
Set the permissions on the input filter file so that it can be executed from root. Use the chmod command as follows, replac-
ing mailing.scr with the name of your input filter file:
chmod 755 /var/spool/lpd/mailing.scr
6. Edit the printcap file to add the input filter to the queue definition. Your entry should now look like this:
mailing:\
:sd=/var/spool/lpd/mailing:\
:mx#0:\
:sh:\
:lp=/dev/lp1:\
:if=/var/spool/lpd/mailing.scr:
It is important to add a backslash to a line before adding a new line, and to add a colon at the end of each new line.
7. Save the changes and exit the printcap file.
You have created your trigger. To print data on the MAILING document, use the queue "mailing". For example:
lpr -Pmailing data.txt
To create a printcap entry by hand:
1. Open the /etc/printcap file with a text editor. For example, you might open it with the vi text editor by issuing the
command
vi /etc/printcap
2.
Enter the following at the end of the /etc/printcap file. Change the queue name and spool directory to reflect your instal-
lation. This printcap entry is for a text-only printer on device lp1 named mailing, that uses the spool directory
/var/spool/lpd/mailing.
Creating Triggers
©2014 Objectif Lune Inc - 37 -