BSD 4_3 release
[unix-history] / usr / man / man5 / printcap.5
CommitLineData
3cb56a8c
KM
1.\" Copyright (c) 1983 Regents of the University of California.
2.\" All rights reserved. The Berkeley software License Agreement
3.\" specifies the terms and conditions for redistribution.
4.\"
95f51977 5.\" @(#)printcap.5 6.4 (Berkeley) 5/14/86
3cb56a8c 6.\"
95f51977 7.TH PRINTCAP 5 "May 14, 1986"
3cb56a8c
KM
8.UC 5
9.ad
10.SH NAME
11printcap \- printer capability data base
12.SH SYNOPSIS
13/etc/printcap
14.SH DESCRIPTION
15.I Printcap
16is a simplified version of the
17.IR termcap (5)
18data base
19used to describe line printers. The spooling system accesses the
20.I printcap
21file every time it is used, allowing dynamic
22addition and deletion of printers. Each entry in the data base
23is used to describe one printer. This data base may not be
24substituted for, as is possible for
25.IR termcap ,
26because it may allow accounting to be bypassed.
27.PP
28The default printer is normally
29.IR lp ,
30though the environment variable PRINTER
31may be used to override this. Each spooling utility supports an option,
32.BI \-P printer,
33to allow explicit naming of a destination printer.
34.PP
35Refer to the
36.ul
6731432e 374.3BSD Line Printer Spooler Manual
3cb56a8c
KM
38for a complete discussion on how setup the database for a given printer.
39.SH CAPABILITIES
40Refer to
d6bb634f 41.IR termcap (5)
3cb56a8c
KM
42for a description of the file layout.
43.nf
44
45.ta \w'k0-k9 'u +\w'Type 'u +\w'``/usr/spool/lpd\'\' 'u
46\fBName Type Default Description\fR
47af str NULL name of accounting file
48br num none if lp is a tty, set the baud rate (ioctl call)
49cf str NULL cifplot data filter
50df str NULL tex data filter (DVI format)
51fc num 0 if lp is a tty, clear flag bits (sgtty.h)
52ff str ``\ef'' string to send for a form feed
53fo bool false print a form feed when device is opened
54fs num 0 like `fc' but set bits
55gf str NULL graph data filter (plot (3X) format)
bbeaa2c1 56hl bool false print the burst header page last
3cb56a8c
KM
57ic bool false driver supports (non standard) ioctl to indent printout
58if str NULL name of text filter which does accounting
59lf str ``/dev/console'' error logging file name
60lo str ``lock'' name of lock file
61lp str ``/dev/lp'' device name to open for output
62mx num 1000 maximum file size (in BUFSIZ blocks), zero = unlimited
63nd str NULL next directory for list of queues (unimplemented)
64nf str NULL ditroff data filter (device independent troff)
65of str NULL name of output filtering program
7e53503a 66pc num 200 price per foot or page in hundredths of cents
3cb56a8c
KM
67pl num 66 page length (in lines)
68pw num 132 page width (in characters)
69px num 0 page width in pixels (horizontal)
70py num 0 page length in pixels (vertical)
71rf str NULL filter for printing FORTRAN style text files
bbeaa2c1 72rg str NULL restricted group. Only members of group allowed access
3cb56a8c
KM
73rm str NULL machine name for remote printer
74rp str ``lp'' remote printer name argument
75rs bool false restrict remote users to those with local accounts
76rw bool false open the printer device for reading and writing
77sb bool false short banner (one line only)
78sc bool false suppress multiple copies
79sd str ``/usr/spool/lpd'' spool directory
80sf bool false suppress form feeds
81sh bool false suppress printing of burst page header
82st str ``status'' status file name
83tf str NULL troff data filter (cat phototypesetter)
84tr str NULL trailer string to print when queue empties
85vf str NULL raster image filter
86xc num 0 if lp is a tty, clear local mode bits (tty (4))
87xs num 0 like `xc' but set bits
88.fi
89.PP
3cb56a8c
KM
90If the local line printer driver supports indentation, the daemon
91must understand how to invoke it.
d6bb634f
EA
92.SH FILTERS
93The
94.IR lpd (8)
95daemon creates a pipeline of
96.I filters
97to process files for various printer types.
98The filters selected depend on the flags passed to
99.IR lpr (1).
100The pipeline set up is:
101.RS
102.PP
103.nf
104.ta 0.5i +1i
105\-p pr | if regular text + \fIpr\fP(1)
106none if regular text
107\-c cf cifplot
108\-d df DVI (tex)
109\-g gf \fIplot\fP(3)
110\-n nf ditroff
111\-f rf Fortran
112\-t tf troff
113\-v vf raster image
114.fi
115.RE
116.PP
117The
118.B if
119filter is invoked with arguments:
120.PP
121 \fIif\fP [ \fB\-c\fP ] \fB\-w\fPwidth \fB\-l\fPlength \fB\-i\fPindent \fB\-n\fP login \fB\-h\fP host acct-file
122.PP
123The
124.B \-c
125flag is passed only if the
126.B \-l
127flag (pass control characters literally)
128is specified to
129.IR lpr .
130.I Width
131and
132.I length
133specify the page width and length
134(from
135.B pw
136and
137.B pl
138respectively) in characters.
139The
140.B \-n
141and
142.B \-h
143parameters specify the login name and host name of the owner
144of the job respectively.
145.I Acct-file
146is passed from the
147.B af
148.I printcap
149entry.
150.PP
151If no
152.B if
153is specified,
154.B of
155is used instead,
156with the distinction that
157.B of
158is opened only once,
159while
160.B if
161is opened for every individual job.
162Thus,
163.B if
164is better suited to performing accounting.
165The
166.B of
167is only given the
168.I width
169and
170.I length
171flags.
172.PP
173All other filters are called as:
174.PP
175 \fIfilter\fP \fB\-x\fPwidth \fB\-y\fPlength \fB\-n\fP login \fB\-h\fP host acct-file
176.PP
177where
178.I width
179and
180.I length
181are represented in pixels,
182specified by the
183.B px
184and
185.B py
186entries respectively.
187.PP
188All filters take
189.I stdin
190as the file,
191.I stdout
192as the printer,
193may log either to
194.I stderr
195or using
196.IR syslog (3),
197and must not ignore
198.SM SIGINT.
199.SH LOGGING
200Error messages generated by the line printer programs themselves
201(that is, the
202.IR lp *
203programs)
204are logged by
205.IR syslog (3)
206using the
207.I LPR
208facility.
209Messages printed on
210.I stderr
211of one of the filters
212are sent to the corresponding
213.B lf
214file.
215The filters may, of course, use
216.I syslog
217themselves.
218.PP
219Error messages sent to the console have a carriage return and a line
220feed appended to them, rather than just a line feed.
3cb56a8c
KM
221.SH "SEE ALSO"
222termcap(5),
223lpc(8),
224lpd(8),
225pac(8),
226lpr(1),
227lpq(1),
228lprm(1)
229.br
230.ul
6731432e 2314.3BSD Line Printer Spooler Manual