.TH psf 8 "17 Dec 1991" 2.0.3 Netatalk 
.SH NAME
psf \- PostScript filter
.SH SYNOPSIS
\fBpsf\fR [ \-n \fBname\fR ] [ \-h \fBhost\fR ] [ \-w \fBwidth\fR ] [ \-l \fBlength\fR ] [ \-i \fBindent\fR ] [\-c]
.SH DESCRIPTION
psf is an \fIlpd\fR
filter for PostScript printing. psf interprets the name
it was called with to determine what filters to invoke. First, if the
string ``pap'' appears anywhere in the name, psf
invokes \fIpap\fR to talk to a printer via
AppleTalk. Next, if the string ``rev'' appears,
psf invokes \fIpsorder\fR to
reverse the pages of the job. Finally, if psf was
called with a filter's name as the leading string, it invokes that
filter. If there is no filter to run, psf examines the
magic number of the input, and if the input is not PostScript, converts it
to PostScript.
.SH KLUDGE
In the default configuration, psf supports two
kludges. The first causes psf to check its name for the
letter `m'. If this letter is found and accounting is turned on,
psf calls \fIpap\fR twice,
once to get an initial page count and to print the job, and another time
to get a final page count. This is a work\-around for bugs in a variety of
PAP implementions that cause printers to never properly close the PAP
output file. A notable example is any printer by Hewlett\-Packard.
.PP
The second kludge causes psf to examine its name
for the letter `w'. If this letter is found and accounting is turned
on, psf calls \fIpap\fR with
the \fB\-w\fR flag. This flag causes \fIpap\fR
to wait until the printer's status contains the string `idle'.
Once this string is found, the job is printed as normal. This kludge is a
work\-around for printers, notably Hewlett\-Packard's LaserJet IV, which
will report a page count while a previous jobs is still printing.
.SH EXAMPLE
The sample \fIprintcap\fR entry below
invokes psf to print text files, PostScript files,
\fItroff\fR's C/A/T output, and \fITeX\fR's DVI output, to an AppleTalk connected
LaserWriter Plus. Since the LaserWriter Plus stacks pages in descending
order, we reverse the pages and print the burst page last.
.PP
.nf

laser|lp|LaserWriter Plus on AppleTalk:\\
    :sd=/usr/spool/lpd/laser:\\
    :lp=/usr/spool/lpd/laser/null:\\
    :lf=/var/adm/lpd\-errs:pw#80:hl:\\
    :of=:LIBEXECDIR:/ofpap:\\
    :if=:LIBEXECDIR:/ifpaprev:\\
    :tf=:LIBEXECDIR:/tfpaprev:\\
    :df=:LIBEXECDIR:/dfpaprev:
.fi
.PP
Note that if the host in question spools to more than one AppleTalk
printer, \fB/dev/null\fR should not be used for the
\fIlp\fR capability. Instead, a null device
should be created with \fImknod\fR for each
printer, as has been done above.
.PP
Finally, there is a file in the spool directory,
\fB/var/spool/lpd/laser\fR, called .paprc,
which \fIpap\fR reads for the AppleTalk name of
the printer.
.SH "SEE ALSO"
\fBpsorder\fR(1),
\fBprintcap\fR(5),
\fBlpd\fR(1),
\fBmknod\fR(1),
\fBpap\fR(1).

