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