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