Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

psf(8) [redhat man page]

PSF(8)							      System Manager's Manual							    PSF(8)

NAME
psf - PostScript filter SYNOPSIS
psf [ -n name ] [ -h host ] [ -w width ] [ -l length ] [ -i indent ] [ -c ] DESCRIPTION
psf is an lpd 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 pap to talk to a printer via AppleTalk. Next, if the string ``rev'' appears, psf invokes psorder 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 Post- Script. 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 pap 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. 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 pap with the -w flag. This flag causes pap 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. EXAMPLE
The sample printcap entry below invokes psf to print text files, PostScript files, troff's C/A/T output, and TeX'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. 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=/usr/lib/filters/ofpap: :if=/usr/lib/filters/ifpaprev: :tf=/usr/lib/filters/tfpaprev: :df=/usr/lib/filters/dfpaprev: Note that if the host in question spools to more than one AppleTalk printer, /dev/null should not be used for the lp capability. Instead, a null device should be created with mknod for each printer, as has been done above. Finally, there is a file in the spool directory, /var/spool/lpd/laser, called .paprc, which pap reads for the AppleTalk name of the printer. SEE ALSO
psorder(1), printcap(5), lpd(8), mknod(8), pap(8). netatalk 1.2 17 Dec 1991 PSF(8)

Check Out this Related Man Page

PAP(8)							      System Manager's Manual							    PAP(8)

NAME
pap - download files to or communicate interactively with an AppleTalk network connected printer SYNOPSIS
/usr/sbin/pap [ -d ] [ -p printer ] [ -s statusfile ] [ files ] DESCRIPTION
pap is used to connect and send files to an AppleTalk connected printer using the Apple Printer Access Protocol (PAP). pap can also be used to conduct an interactive session with a PostScript printer. When pap starts execution, it first tries obtain the status of the printer. It then tries to open a session with the printer using PAP, and then downloads the files to the printer. If no files are given on the command line, pap begins reading from standard input. If no printer is specified on the command line, pap looks for a file called .paprc in the current directory and reads it to obtain the name of a printer. The .paprc file should contain a single line of the form object:type@zone where each of object, :type, and @zone are optional. type and zone must be proceeded by `:' and `@' respectively. Lines the begin with a `#' are ignored. type and zone default to LaserWriter and the zone of the local host, respectively. Note that pap is designed to be useful as a communication filter for sending lpd(8) spooled print jobs to AppleTalk connected printers. See psf(8) for hints on how to use it this way. OPTIONS
-p printer Connect to the printer named printer (do not consult the .paprc file to find a printer name). The syntax for printer is the same as discussed above for the .paprc file. -s statusfile Update the file called statusfile to contain the most recent status message from the printer. pap gets the status from the printer when it is waiting for the printer to process input. The statusfile will contain a single line terminated with a newline. This is useful when pap is invoked by lpd(8) within lpd's spool directory. -c Take cuts. The PAP protocol specified a simple queuing procedure, such that the clients tell the printer how long they've been waiting to print. This option causes pap to lie about how long it's been waiting. -e Send stdout to stderr. This causes information that the printer returns to be recorded as error output for lpd. -E Don't wait for EOF from the printer. This option is useful for printers which don't implement PAP correctly. In a correct imple- mentation, the client side should wait for the printer to return EOF before closing the connection. Some clients don't wait, and hence some printers have related bugs in their implementation. -w Wait for the printer's status to contain the word "waiting" before sending the job. This is to defeat printer-side spool available on HP IV and V printers. FILES
.paprc file that contains printer name ~/.paprc secondary file to look in for printer name SEE ALSO
nbp(1), pap(4), lpd(8), papstatus(8), psf(8). BUGS
pap will send a quit command to exit interactive mode when it gets an end-of-file on a tty. If the user has already typed quit themselves, the quit that pap sends is spurious and will cause a PostScript error. The fix would be for pap to watch what the user types and look for quit, but this is impractical. netatalk 1.2 13 Dec 1991 PAP(8)
Man Page