PRINTCAP(5) — NEWS-OS Programmer’s Manual
NAME
printcap − printer capability data base
SYNOPSIS
/etc/printcap
DESCRIPTION
printcap is a simplified version of the termcap(5) data base used to describe line printers. The spooling system accesses the printcap file every time it is used, allowing dynamic addition and deletion of printers. Each entry in the data base is used to describe one printer. This data base may not be substituted for, as is possible for termcap, because it may allow accounting to be bypassed.
The default printer is normally lp, though the environment variable PRINTER may be used to override this. Each spooling utility supports an option, −Pprinter-name, to allow explicit naming of a destination printer.
Refer to the 4.3BSD Line Printer Spooler Manual for a complete discussion on how setup the database for a given printer.
CAPABILITIES
Refer to termcap(5) for a description of the file layout.
NameTypeDefaultDescription
afstrNULLname of accounting file
brnumnoneif lp is a tty, set the baud rate (ioctl
call)
cfstrNULLname of filter for CDIF data
ctstrNULLthe code type of printer, which lpr(1)
refers to on auto code conversion
dfstrNULLtex data filter (DVI format)
efstrNULLLBP-8 Emulator
fcnum0if lp is a tty, clear flag bits (sgtty.h)
ffstr\fstring to send for a form feed
foboolfalseprint a form feed when device is opened
fsnum0like fc but set bits
gfstrNULLgraph data filter (plot(3X) format)
hlboolfalseprint the burst header page last
icboolfalsedriver supports (non standard) ioctl to
indent printout
ifstrNULLname of default text filter
lbboolfalseindicates this printer is LBP (NWP-533/
537/543/550/5501). The extended
mechanism to report the error is used.
lfstr/dev/consoleerror logging file name
listrNULLconfiguration file for LBP
lostrlockname of lock file
lpstr/dev/lpdevice name to open for output
mxnum1000maximum file size (in BUFSIZ blocks),
zero = unlimited
ndstrNULLnext directory for list of queues
(unimplemented)
nfstrNULLditroff data filter (device independent
troff)
ofstrNULLname of output filter which works for
several files but not accounting
pcnum200price per foot or page in hundredths of
cents
plnum66page length (in lines)
pwnum132page width (in characters)
pxnum0page width in pixel (horizontal)
pynum0page length in pixel (vertical)
rfstrNULLfilter for printing FORTRAN style text
files
rgstrNULLrestricted group. Only members of group
allowed access
rmstrNULLmachine name for remote printer
rpstrlpremote printer name argument
rsboolfalserestrict remote users to those with local
accounts
rwboolfalseopen the printer device for reading and
writing
sbboolfalseshort banner (one line only)
scboolfalsesuppress multiple copies
sdstr/usr/spool/lpdspool directory
sfboolfalsesuppress form feeds
shboolfalsesuppress printing of burst page header
ststrstatusstatus file name
tfstrNULLtroff data filter (cat phototypesetter)
trstrNULLtrailer string to print when queue empties
vfstrNULLraster image filter
xcnum0if lp is a tty, clear local mode bits
(tty(4))
xsnum0like xc but set bits
xfstrNULLname of filter for xwd image date
S[a]strNULLname of special filter, which can be
defined by user.
If the local line printer driver supports indentation, the daemon must understand how to invoke it.
FILTERS
The lpd(8) daemon creates a pipeline of filters to process files for various printer types. The filters selected depend on the flags passed to lpr(1). The pipeline set up is:
noneifregular text
−ccfCDIF
−ddfDVI (tex)
−eefLBP-8 Emulator
−frfFortran
−ggfplot(3)
−nnfditroff
−ppr | ifregular text + pr(1)
−ttftroff
−vvfraster image
−xxfX window dump
The if filter is invoked with arguments:
if [ −c ] [ −bopt1 [ −bopt2 ]] −wwidth −llength −iindent −n login −h host acct-file
The −c flag is passed only if the −l flag (pass control characters literally) is specified to lpr. −b option is explained below. width and length specify the page width and length (from pw and pl respectively) in characters. The −n and −h parameters specify the login name and host name of the owner of the job respectively. acct-file is passed from the af printcap entry.
If no if is specified, of is used instead, with the distinction that of is opened only once, while if is opened for every individual job. Thus, if is better suited to performing accounting. The of is only given the width and length flags.
All other filters are called as:
filter [ −bopt1 [ −bopt2 ]] −xwidth −ylength −n login −h host acct-file
−b option is the one specified to lpr or the option generated by lpd.
The opt which starts with character ‘:’(colon) is reserved by NEWS-OS and is interpreted by "LBP Library". width and length are represented in pixel, specified by the px and py entries respectively.
All filters take stdin as the file, stdout as the printer, may log either to stderr or using syslog(3), and must not ignore SIGINT.
LOGGING
Error messages generated by the line printer programs themselves (that is, the lp∗ programs) are logged by syslog(3) using the LPR facility. Messages printed on stderr of one of the filters are sent to the corresponding lf file. The filters may, of course, use syslog themselves.
Error messages sent to the console have a carriage return and a line feed appended to them, rather than just a line feed.
If printcap includes lb field for certain printer, and if the printer filter is one for LBP supplied in NEWS-OS release 4.0, the error report mechanism is extended as follows:
The error messages are classified into 3 categories:
Operator message
Operator message such as "paper empty" or "jam" which seems to be recovered by the operator are reported by lpq command.
User message
Job specific messages such as "the reason why the print job is aborted" are reported by mail to the user if lpr is invoked with −m option, or printed into a trailer page if it is requested.
Administrator message
Administrator message such as "Printer hardware trouble" or "Errors in installation" is sent to the corresponding lf file.
SEE ALSO
lpr(1), lpq(1), lprm(1), a3sjlbp(1), newslbp(1), termcap(5), lpc(8), lpd(8), pac(8), lbp_filters(8)
4.3BSD Line Printer Spooler Manual
NEWS-OSRelease 4.2.1R