OSDN Git Service

Import translated manuals from JM CVS Repository.
[linuxjm/jm.git] / manual / lpr-linux / original / man5 / printcap.5
1 .\" Copyright (c) 1983, 1991 Regents of the University of California.
2 .\" 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  6.6 (Berkeley) 5/10/91
33 .\"
34 .Dd May 10, 1991
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 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 .El
126 .Pp
127 If the local line printer driver supports indentation, the daemon
128 must understand how to invoke it.
129 .Sh FILTERS
130 The
131 .Xr lpd 8
132 daemon creates a pipeline of
133 .Em filters
134 to process files for various printer types.
135 The filters selected depend on the flags passed to
136 .Xr lpr 1 .
137 The pipeline set up is:
138 .Bd -literal -offset indent
139 p       pr | if regular text + pr(1)
140 none    if      regular text
141 c       cf      cifplot
142 d       df      DVI (tex)
143 g       gf      plot(3)
144 n       nf      ditroff
145 f       rf      Fortran
146 t       tf      troff
147 v       vf      raster image
148 .Ed
149 .Pp
150 The
151 .Sy if
152 filter is invoked with arguments:
153 .Bd -filled -offset indent
154 .Cm if
155 .Op Fl c
156 .Fl w Ns Ar width
157 .Fl l Ns Ar length
158 .Fl i Ns Ar indent
159 .Fl n Ar login
160 .Fl h Ar host acct-file
161 .Ed
162 .Pp
163 The
164 .Fl c
165 flag is passed only if the
166 .Fl l
167 flag (pass control characters literally)
168 is specified to
169 .Xr lpr .
170 The
171 .Ar Width
172 function
173 and
174 .Ar length
175 specify the page width and length
176 (from
177 .Cm pw
178 and
179 .Cm pl
180 respectively) in characters.
181 The
182 .Fl n
183 and
184 .Fl h
185 parameters specify the login name and host name of the owner
186 of the job respectively.
187 The
188 .Ar Acct-file
189 function
190 is passed from the
191 .Cm af
192 .Nm printcap
193 entry.
194 .Pp
195 If no
196 .Cm if
197 is specified,
198 .Cm of
199 is used instead,
200 with the distinction that
201 .Cm of
202 is opened only once,
203 while
204 .Cm if
205 is opened for every individual job.
206 Thus,
207 .Cm if
208 is better suited to performing accounting.
209 The
210 .Cm of
211 is only given the
212 .Ar width
213 and
214 .Ar length
215 flags.
216 .Pp
217 All other filters are called as:
218 .Bd -filled -offset indent
219 .Nm filter
220 .Fl x Ns Ar width
221 .Fl y Ns Ar length
222 .Fl n Ar login
223 .Fl h Ar host acct-file
224 .Ed
225 .Pp
226 where
227 .Ar width
228 and
229 .Ar length
230 are represented in pixels,
231 specified by the
232 .Cm px
233 and
234 .Cm py
235 entries respectively.
236 .Pp
237 All filters take
238 .Em stdin
239 as the file,
240 .Em stdout
241 as the printer,
242 may log either to
243 .Em stderr
244 or using
245 .Xr syslog 3 ,
246 and must not ignore
247 .Dv SIGINT . 
248 .Sh LOGGING
249 Error messages generated by the line printer programs themselves
250 (that is, the
251 .Xr lp Ns *
252 programs)
253 are logged by
254 .Xr syslog 3
255 using the
256 .Dv LPR
257 facility.
258 Messages printed on
259 .Em stderr
260 of one of the filters
261 are sent to the corresponding
262 .Cm lf
263 file.
264 The filters may, of course, use
265 .Xr syslog
266 themselves.
267 .Pp
268 Error messages sent to the console have a carriage return and a line
269 feed appended to them, rather than just a line feed.
270 .Sh SEE ALSO
271 .Xr termcap 5 ,
272 .Xr lpc 8 ,
273 .Xr lpd 8 ,
274 .Xr pac 8 ,
275 .Xr lpr 1 ,
276 .Xr lpq 1 ,
277 .Xr lprm 1
278 .Rs
279 .%T "4.3 BSD Line Printer Spooler Manual"
280 .Re
281 .Sh HISTORY
282 The
283 .Nm
284 file format appeared in
285 .Bx 4.2 ..