1PRINTCAP(5)                   File Formats Manual                  PRINTCAP(5)
2
3
4

NAME

6       printcap - printer capability data base
7

SYNOPSIS

9       /etc/printcap
10

DESCRIPTION

12       Printcap  is  a  simplified version of the termcap(5) data base used to
13       describe line printers.  The spooling system accesses the printcap file
14       every time it is used, allowing dynamic addition and deletion of print‐
15       ers.  Each entry in the data base is  used  to  describe  one  printer.
16       This  data base may not be substituted for, as is possible for termcap,
17       because it may allow accounting to be bypassed.
18
19       The default printer is normally lp,  though  the  environment  variable
20       PRINTER  may  be used to override this.  Each spooling utility supports
21       an option,  -Pprinter,  to  allow  explicit  naming  of  a  destination
22       printer.
23
24       Refer  to the 4.3BSD Line Printer Spooler Manual for a complete discus‐
25       sion on how setup the database for a given printer.
26

CAPABILITIES

28       Refer to termcap(5) for a description of the file layout.
29
30       Name   Type  Default             Description
31       af     str   NULL                name of accounting file
32       br     num   none                if lp is a tty, set the baud rate (ioctl call)
33       cf     str   NULL                cifplot data filter
34       df     str   NULL                tex data filter (DVI format)
35       fc     num   0                   if lp is a tty, clear flag bits (sgtty.h)
36       ff     str   ``\f''              string to send for a form feed
37       fo     bool  false               print a form feed when device is opened
38       fs     num   0                   like `fc' but set bits
39       gf     str   NULL                graph data filter (plot (3X) format)
40       hl     bool  false               print the burst header page last
41       ic     bool  false               driver supports (non standard) ioctl to indent printout
42       if     str   NULL                name of text filter which does accounting
43       lf     str   ``/dev/console''    error logging file name
44       lo     str   ``lock''            name of lock file
45       lp     str   ``/dev/lp''         device name to open for output
46       mx     num   1000                maximum file size (in BUFSIZ blocks), zero = unlimited
47       nd     str   NULL                next directory for list of queues (unimplemented)
48       nf     str   NULL                ditroff data filter (device independent troff)
49       of     str   NULL                name of output filtering program
50       pc     num   200                 price per foot or page in hundredths of cents
51       pl     num   66                  page length (in lines)
52       pw     num   132                 page width (in characters)
53       px     num   0                   page width in pixels (horizontal)
54       py     num   0                   page length in pixels (vertical)
55       rf     str   NULL                filter for printing FORTRAN style text files
56       rg     str   NULL                restricted group. Only members of group allowed access
57       rm     str   NULL                machine name for remote printer
58       rp     str   ``lp''              remote printer name argument
59       rs     bool  false               restrict remote users to those with local accounts
60       rw     bool  false               open the printer device for reading and writing
61       sb     bool  false               short banner (one line only)
62       sc     bool  false               suppress multiple copies
63       sd     str   ``/usr/spool/lpd''  spool directory
64       sf     bool  false               suppress form feeds
65       sh     bool  false               suppress printing of burst page header
66       st     str   ``status''          status file name
67       tf     str   NULL                troff data filter (cat phototypesetter)
68       tr     str   NULL                trailer string to print when queue empties
69       vf     str   NULL                raster image filter
70       xc     num   0                   if lp is a tty, clear local mode bits (tty (4))
71       xs     num   0                   like `xc' but set bits
72
73       If the local line printer driver supports indentation, the daemon  must
74       understand how to invoke it.
75

FILTERS

77       The  lpd(8)  daemon  creates a pipeline of filters to process files for
78       various printer types.  The filters selected depend on the flags passed
79       to lpr(1).  The pipeline set up is:
80
81              -p   pr | if   regular text + pr(1)
82              none if        regular text
83              -c   cf        cifplot
84              -d   df        DVI (tex)
85              -g   gf        plot(3)
86              -n   nf        ditroff
87              -f   rf        Fortran
88              -t   tf        troff
89              -v   vf        raster image
90
91       The if filter is invoked with arguments:
92
93            if [ -c ] -wwidth -llength -iindent -n login -h host acct-file
94
95       The -c flag is passed only if the -l flag (pass control characters lit‐
96       erally) is specified to lpr.  Width and length specify the  page  width
97       and  length (from pw and pl respectively) in characters.  The -n and -h
98       parameters specify the login name and host name of the owner of the job
99       respectively.  Acct-file is passed from the af printcap entry.
100
101       If no if is specified, of is used instead, with the distinction that of
102       is opened only once, while if  is  opened  for  every  individual  job.
103       Thus,  if  is  better  suited to performing accounting.  The of is only
104       given the width and length flags.
105
106       All other filters are called as:
107
108            filter -xwidth -ylength -n login -h host acct-file
109
110       where width and length are represented in pixels, specified by  the  px
111       and py entries respectively.
112
113       All  filters  take  stdin  as  the file, stdout as the printer, may log
114       either to stderr or using syslog(3), and must not ignore SIGINT.
115

LOGGING

117       Error messages generated by the line printer programs themselves  (that
118       is,  the  lp* programs) are logged by syslog(3) using the LPR facility.
119       Messages printed on stderr of one of the filters are sent to the corre‐
120       sponding lf file.  The filters may, of course, use syslog themselves.
121
122       Error  messages  sent  to the console have a carriage return and a line
123       feed appended to them, rather than just a line feed.
124

SEE ALSO

126       termcap(5), lpc(8), lpd(8), pac(8), lpr(1), lpq(1), lprm(1)
127       4.3BSD Line Printer Spooler Manual
128
129
130
1314.2 Berkeley Distribution        May 14, 1986                      PRINTCAP(5)
Impressum