]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - share/man/man5/printcap.5
BSD 4.4 Lite Share Sources
[FreeBSD/FreeBSD.git] / share / man / man5 / printcap.5
1 .\" Copyright (c) 1983, 1991, 1993
2 .\"     The Regents of the University of California.  All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\"    notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\"    notice, this list of conditions and the following disclaimer in the
11 .\"    documentation and/or other materials provided with the distribution.
12 .\" 3. All advertising materials mentioning features or use of this software
13 .\"    must display the following acknowledgement:
14 .\"     This product includes software developed by the University of
15 .\"     California, Berkeley and its contributors.
16 .\" 4. Neither the name of the University nor the names of its contributors
17 .\"    may be used to endorse or promote products derived from this software
18 .\"    without specific prior written permission.
19 .\"
20 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 .\" SUCH DAMAGE.
31 .\"
32 .\"     @(#)printcap.5  8.2 (Berkeley) 12/11/93
33 .\"
34 .Dd December 11, 1993
35 .Dt PRINTCAP 5
36 .Os BSD 4.2
37 .Sh NAME
38 .Nm printcap
39 .Nd printer capability data base
40 .Sh SYNOPSIS
41 .Nm printcap
42 .Sh DESCRIPTION
43 The
44 .Nm Printcap
45 function
46 is a simplified version of the
47 .Xr termcap 5
48 data base
49 used to describe line printers.  The spooling system accesses the
50 .Nm printcap
51 file every time it is used, allowing dynamic
52 addition and deletion of printers.  Each entry in the data base
53 is used to describe one printer.  This data base may not be
54 substituted for, as is possible for 
55 .Xr termcap ,
56 because it may allow accounting to be bypassed.
57 .Pp
58 The default printer is normally 
59 .Em lp ,
60 though the environment variable
61 .Ev PRINTER
62 may be used to override this.  Each spooling utility supports an option,
63 .Fl P Ar printer ,
64 to allow explicit naming of a destination printer.
65 .Pp
66 Refer to the
67 .%T "4.3 BSD Line Printer Spooler Manual"
68 for a complete discussion on how to setup the database for a given printer.
69 .Sh CAPABILITIES
70 Refer to
71 .Xr termcap 5
72 for a description of the file layout.
73 .Bl -column Namexxx Typexx "/var/spool/lpdxxxxx"
74 .Sy Name        Type    Description
75 .It "af str" Ta Dv NULL Ta No "name of accounting file"
76 .It "br num     none    if lp is a tty, set the baud rate"
77 .Pf ( Xr ioctl 2
78 call)
79 .It "cf str" Ta Dv NULL Ta No "cifplot data filter"
80 .It "df str" Ta Dv NULL Ta No "tex data filter"
81 .Pf ( Tn DVI
82 format)
83 .It "fc num     0       if lp is a tty, clear flag bits"
84 .Pq Pa sgtty.h
85 .It "ff str" Ta So Li \ef Sc Ta No "string to send for a form feed"
86 .It "fo bool    false   print a form feed when device is opened"
87 .It "fs num     0       like `fc' but set bits"
88 .It "gf str" Ta Dv NULL Ta No "graph data filter"
89 .Pf ( Xr plot 3
90 format
91 .It "hl bool    false   print the burst header page last"
92 .It "ic bool    false   driver supports (non standard) ioctl to indent printout"
93 .It "if str" Ta Dv NULL Ta No "name of text filter which does accounting"
94 .It "lf str" Ta Pa /dev/console Ta No "error logging file name"
95 .It "lo str" Ta Pa lock Ta No "name of lock file"
96 .It "lp str" Ta Pa /dev/lp Ta No "device name to open for output"
97 .It "mx num     1000    maximum file size (in"
98 .Dv BUFSIZ
99 blocks), zero = unlimited
100 .It "nd str" Ta Dv NULL Ta No "next directory for list of queues (unimplemented)"
101 .It "nf str" Ta Dv NULL Ta No "ditroff data filter (device independent troff)"
102 .It "of str" Ta Dv NULL Ta No "name of output filtering program"
103 .It "pc num     200     price per foot or page in hundredths of cents"
104 .It "pl num     66      page length (in lines)"
105 .It "pw num     132     page width (in characters)"
106 .It "px num     0       page width in pixels (horizontal)"
107 .It "py num     0       page length in pixels (vertical)"
108 .It "rf str" Ta Dv NULL Ta No "filter for printing"
109 .Tn FORTRAN
110 style text files
111 .It "rg str" Ta Dv NULL Ta No "restricted group. Only members of group allowed access"
112 .It "rm str" Ta Dv NULL Ta No "machine name for remote printer"
113 .It "rp str     ``lp''  remote printer name argument"
114 .It "rs bool    false   restrict remote users to those with local accounts"
115 .It "rw bool    false   open the printer device for reading and writing"
116 .It "sb bool    false   short banner (one line only)"
117 .It "sc bool    false   suppress multiple copies"
118 .It "sd str" Ta Pa /var/spool/lpd Ta No "spool directory"
119 .It "sf bool    false   suppress form feeds"
120 .It "sh bool    false   suppress printing of burst page header"
121 .It "st str" Ta Pa status Ta No "status file name"
122 .It "tf str" Ta Dv NULL Ta No "troff data filter (cat phototypesetter)"
123 .It "tr str" Ta Dv NULL Ta No "trailer string to print when queue empties"
124 .It "vf str" Ta Dv NULL Ta No "raster image filter"
125 .It "xc num     0       if lp is a tty, clear local mode bits"
126 .Pq Xr tty 4
127 .It "xs num     0       like `xc' but set bits"
128 .El
129 .Pp
130 If the local line printer driver supports indentation, the daemon
131 must understand how to invoke it.
132 .Sh FILTERS
133 The
134 .Xr lpd 8
135 daemon creates a pipeline of
136 .Em filters
137 to process files for various printer types.
138 The filters selected depend on the flags passed to
139 .Xr lpr 1 .
140 The pipeline set up is:
141 .Bd -literal -offset indent
142 p       pr | if regular text + pr(1)
143 none    if      regular text
144 c       cf      cifplot
145 d       df      DVI (tex)
146 g       gf      plot(3)
147 n       nf      ditroff
148 f       rf      Fortran
149 t       tf      troff
150 v       vf      raster image
151 .Ed
152 .Pp
153 The
154 .Sy if
155 filter is invoked with arguments:
156 .Bd -filled -offset indent
157 .Cm if
158 .Op Fl c
159 .Fl w Ns Ar width
160 .Fl l Ns Ar length
161 .Fl i Ns Ar indent
162 .Fl n Ar login
163 .Fl h Ar host acct-file
164 .Ed
165 .Pp
166 The
167 .Fl c
168 flag is passed only if the
169 .Fl l
170 flag (pass control characters literally)
171 is specified to
172 .Xr lpr .
173 The
174 .Ar Width
175 function
176 and
177 .Ar length
178 specify the page width and length
179 (from
180 .Cm pw
181 and
182 .Cm pl
183 respectively) in characters.
184 The
185 .Fl n
186 and
187 .Fl h
188 parameters specify the login name and host name of the owner
189 of the job respectively.
190 The
191 .Ar Acct-file
192 function
193 is passed from the
194 .Cm af
195 .Nm printcap
196 entry.
197 .Pp
198 If no
199 .Cm if
200 is specified,
201 .Cm of
202 is used instead,
203 with the distinction that
204 .Cm of
205 is opened only once,
206 while
207 .Cm if
208 is opened for every individual job.
209 Thus,
210 .Cm if
211 is better suited to performing accounting.
212 The
213 .Cm of
214 is only given the
215 .Ar width
216 and
217 .Ar length
218 flags.
219 .Pp
220 All other filters are called as:
221 .Bd -filled -offset indent
222 .Nm filter
223 .Fl x Ns Ar width
224 .Fl y Ns Ar length
225 .Fl n Ar login
226 .Fl h Ar host acct-file
227 .Ed
228 .Pp
229 where
230 .Ar width
231 and
232 .Ar length
233 are represented in pixels,
234 specified by the
235 .Cm px
236 and
237 .Cm py
238 entries respectively.
239 .Pp
240 All filters take
241 .Em stdin
242 as the file,
243 .Em stdout
244 as the printer,
245 may log either to
246 .Em stderr
247 or using
248 .Xr syslog 3 ,
249 and must not ignore
250 .Dv SIGINT . 
251 .Sh LOGGING
252 Error messages generated by the line printer programs themselves
253 (that is, the
254 .Xr lp Ns *
255 programs)
256 are logged by
257 .Xr syslog 3
258 using the
259 .Dv LPR
260 facility.
261 Messages printed on
262 .Em stderr
263 of one of the filters
264 are sent to the corresponding
265 .Cm lf
266 file.
267 The filters may, of course, use
268 .Xr syslog
269 themselves.
270 .Pp
271 Error messages sent to the console have a carriage return and a line
272 feed appended to them, rather than just a line feed.
273 .Sh SEE ALSO
274 .Xr termcap 5 ,
275 .Xr lpc 8 ,
276 .Xr lpd 8 ,
277 .Xr pac 8 ,
278 .Xr lpr 1 ,
279 .Xr lpq 1 ,
280 .Xr lprm 1
281 .Rs
282 .%T "4.3 BSD Line Printer Spooler Manual"
283 .Re
284 .Sh HISTORY
285 The
286 .Nm
287 file format appeared in
288 .Bx 4.2 ..