
43
carriage return/line feed by the PCL interpreter. unix_pcl is included as C source. The
code is compatible with most versions of the UNIX system (see “Using texttcpif” for
additional information). After compilation, the filter is typically invoked on the command
line as follows:
unix_pcl <filename | lpr -Pprintername
Printing with a master (Berkeley) spooler with tcpif
Tcpif is an “input filter” that enables the printer to receive print jobs over a direct TCP
connection from a UNIX lpd acting as a “master spooler.” The master spooler accepts print
jobs foróarded to it from other lpds on the network. The main advantage of bypassing the
printer’s internal lpd is that optional processing (i.e., filtering) can be performed on print
data before it is sent to the printer.
In order to print using a master spooler you need to:
• Choose a computer on the network whose lpd will be the master spooler.
• Create a spool directory on the machine chosen as the master spooler and on each
machine that will use the printer.
• Edit the printcap files:
• Add the printer’s hostname and attributes to the /etc/printcap file on the master
spooler.
• Add the name of the master spooler to the /etc/printcap file on each computer that
will forward print jobs to the master spooler.
Creating a spool directory on the master spooler
You must create a spool directory on the machine designated as the master spooler and on
each machine that will forward print jobs to the master spooler.
The spool directory is used to temporarily hold print jobs until they are sent to the printer.
Typically, these directories will be named /usr/spool <printername> or /var/spool/lpd/
<printername>. The spool directory should be owned by user daemon and group daemon,
and should be protected 775. Because of the large size of graphics-intensive print jobs, the
spool directory should be on a disk with tens of megabytes of free space.
Editing the
printcap
files
The lpd on the master spooler and the lpd’s on each machine that will forward jobs to the
master spooler for printing are configured through the UNIX system text file /etc/printcap.
The file can be edited by the superuser with any text editor. The printcap file contains