xref: /csrg-svn/share/man/man5/printcap.5 (revision 65101)
161609Sbostic.\" Copyright (c) 1983, 1991, 1993
261609Sbostic.\"	The Regents of the University of California.  All rights reserved.
320823Smckusick.\"
449647Scael.\" %sccs.include.redist.roff%
520823Smckusick.\"
6*65101Smckusick.\"     @(#)printcap.5	8.2 (Berkeley) 12/11/93
748928Scael.\"
849647Scael.Dd
949647Scael.Dt PRINTCAP 5
1049647Scael.Os BSD 4.2
1149647Scael.Sh NAME
1249647Scael.Nm printcap
1349647Scael.Nd printer capability data base
1449647Scael.Sh SYNOPSIS
1549647Scael.Nm printcap
1649647Scael.Sh DESCRIPTION
1749647ScaelThe
1849647Scael.Nm Printcap
1949647Scaelfunction
2020823Smckusickis a simplified version of the
2149647Scael.Xr termcap 5
2220823Smckusickdata base
2320823Smckusickused to describe line printers.  The spooling system accesses the
2449647Scael.Nm printcap
2520823Smckusickfile every time it is used, allowing dynamic
2620823Smckusickaddition and deletion of printers.  Each entry in the data base
2720823Smckusickis used to describe one printer.  This data base may not be
2820823Smckusicksubstituted for, as is possible for
2949647Scael.Xr termcap ,
3020823Smckusickbecause it may allow accounting to be bypassed.
3149647Scael.Pp
3220823SmckusickThe default printer is normally
3349647Scael.Em lp ,
3449647Scaelthough the environment variable
3549647Scael.Ev PRINTER
3620823Smckusickmay be used to override this.  Each spooling utility supports an option,
3749647Scael.Fl P Ar printer ,
3820823Smckusickto allow explicit naming of a destination printer.
3949647Scael.Pp
4020823SmckusickRefer to the
4149647Scael.%T "4.3 BSD Line Printer Spooler Manual"
42*65101Smckusickfor a complete discussion on how to setup the database for a given printer.
4349647Scael.Sh CAPABILITIES
4420823SmckusickRefer to
4549647Scael.Xr termcap 5
4620823Smckusickfor a description of the file layout.
4749647Scael.Bl -column Namexxx Typexx "/var/spool/lpdxxxxx"
4849647Scael.Sy Name	Type	Description
4949647Scael.It "af	str" Ta Dv NULL Ta No "name of accounting file"
5049647Scael.It "br	num	none	if lp is a tty, set the baud rate"
5149647Scael.Pf ( Xr ioctl 2
5249647Scaelcall)
5349647Scael.It "cf	str" Ta Dv NULL Ta No "cifplot data filter"
5449647Scael.It "df	str" Ta Dv NULL Ta No "tex data filter"
5549647Scael.Pf ( Tn DVI
5649647Scaelformat)
5749647Scael.It "fc	num	0	if lp is a tty, clear flag bits"
5849647Scael.Pq Pa sgtty.h
5949647Scael.It "ff	str" Ta So Li \ef Sc Ta No "string to send for a form feed"
6049647Scael.It "fo	bool	false	print a form feed when device is opened"
6149647Scael.It "fs	num	0	like `fc' but set bits"
6249647Scael.It "gf	str" Ta Dv NULL Ta No "graph data filter"
6349647Scael.Pf ( Xr plot 3
6449647Scaelformat
6549647Scael.It "hl	bool	false	print the burst header page last"
6649647Scael.It "ic	bool	false	driver supports (non standard) ioctl to indent printout"
6749647Scael.It "if	str" Ta Dv NULL Ta No "name of text filter which does accounting"
6849647Scael.It "lf	str" Ta Pa /dev/console Ta No "error logging file name"
6949647Scael.It "lo	str" Ta Pa lock Ta No "name of lock file"
7049647Scael.It "lp	str" Ta Pa /dev/lp Ta No "device name to open for output"
7149647Scael.It "mx	num	1000	maximum file size (in"
7249647Scael.Dv BUFSIZ
7349647Scaelblocks), zero = unlimited
7449647Scael.It "nd	str" Ta Dv NULL Ta No "next directory for list of queues (unimplemented)"
7549647Scael.It "nf	str" Ta Dv NULL Ta No "ditroff data filter (device independent troff)"
7649647Scael.It "of	str" Ta Dv NULL Ta No "name of output filtering program"
7749647Scael.It "pc	num	200	price per foot or page in hundredths of cents"
7849647Scael.It "pl	num	66	page length (in lines)"
7949647Scael.It "pw	num	132	page width (in characters)"
8049647Scael.It "px	num	0	page width in pixels (horizontal)"
8149647Scael.It "py	num	0	page length in pixels (vertical)"
8249647Scael.It "rf	str" Ta Dv NULL Ta No "filter for printing"
8349647Scael.Tn FORTRAN
8449647Scaelstyle text files
8549647Scael.It "rg	str" Ta Dv NULL Ta No "restricted group. Only members of group allowed access"
8649647Scael.It "rm	str" Ta Dv NULL Ta No "machine name for remote printer"
8749647Scael.It "rp	str	``lp''	remote printer name argument"
8849647Scael.It "rs	bool	false	restrict remote users to those with local accounts"
8949647Scael.It "rw	bool	false	open the printer device for reading and writing"
9049647Scael.It "sb	bool	false	short banner (one line only)"
9149647Scael.It "sc	bool	false	suppress multiple copies"
9249647Scael.It "sd	str" Ta Pa /var/spool/lpd Ta No "spool directory"
9349647Scael.It "sf	bool	false	suppress form feeds"
9449647Scael.It "sh	bool	false	suppress printing of burst page header"
9549647Scael.It "st	str" Ta Pa status Ta No "status file name"
9649647Scael.It "tf	str" Ta Dv NULL Ta No "troff data filter (cat phototypesetter)"
9749647Scael.It "tr	str" Ta Dv NULL Ta No "trailer string to print when queue empties"
9849647Scael.It "vf	str" Ta Dv NULL Ta No "raster image filter"
9949647Scael.It "xc	num	0	if lp is a tty, clear local mode bits"
10049647Scael.Pq Xr tty 4
10149647Scael.It "xs	num	0	like `xc' but set bits"
10249647Scael.El
10349647Scael.Pp
10425497SericIf the local line printer driver supports indentation, the daemon
10525497Sericmust understand how to invoke it.
10649647Scael.Sh FILTERS
10725497SericThe
10849647Scael.Xr lpd 8
10925497Sericdaemon creates a pipeline of
11049647Scael.Em filters
11125497Sericto process files for various printer types.
11225497SericThe filters selected depend on the flags passed to
11349647Scael.Xr lpr 1 .
11425497SericThe pipeline set up is:
11549647Scael.Bd -literal -offset indent
11649647Scaelp	pr | if	regular text + pr(1)
11725497Sericnone	if	regular text
11849647Scaelc	cf	cifplot
11949647Scaeld	df	DVI (tex)
12049647Scaelg	gf	plot(3)
12149647Scaeln	nf	ditroff
12249647Scaelf	rf	Fortran
12349647Scaelt	tf	troff
12449647Scaelv	vf	raster image
12549647Scael.Ed
12649647Scael.Pp
12725497SericThe
12849647Scael.Sy if
12925497Sericfilter is invoked with arguments:
13049647Scael.Bd -filled -offset indent
13149647Scael.Cm if
13249647Scael.Op Fl c
13349647Scael.Fl w Ns Ar width
13449647Scael.Fl l Ns Ar length
13549647Scael.Fl i Ns Ar indent
13649647Scael.Fl n Ar login
13749647Scael.Fl h Ar host acct-file
13849647Scael.Ed
13949647Scael.Pp
14025497SericThe
14149647Scael.Fl c
14225497Sericflag is passed only if the
14349647Scael.Fl l
14425497Sericflag (pass control characters literally)
14525497Sericis specified to
14649647Scael.Xr lpr .
14749647ScaelThe
14849647Scael.Ar Width
14949647Scaelfunction
15025497Sericand
15149647Scael.Ar length
15225497Sericspecify the page width and length
15325497Seric(from
15449647Scael.Cm pw
15525497Sericand
15649647Scael.Cm pl
15725497Sericrespectively) in characters.
15825497SericThe
15949647Scael.Fl n
16025497Sericand
16149647Scael.Fl h
16225497Sericparameters specify the login name and host name of the owner
16325497Sericof the job respectively.
16449647ScaelThe
16549647Scael.Ar Acct-file
16649647Scaelfunction
16725497Sericis passed from the
16849647Scael.Cm af
16949647Scael.Nm printcap
17025497Sericentry.
17149647Scael.Pp
17225497SericIf no
17349647Scael.Cm if
17425497Sericis specified,
17549647Scael.Cm of
17625497Sericis used instead,
17725497Sericwith the distinction that
17849647Scael.Cm of
17925497Sericis opened only once,
18025497Sericwhile
18149647Scael.Cm if
18225497Sericis opened for every individual job.
18325497SericThus,
18449647Scael.Cm if
18525497Sericis better suited to performing accounting.
18625497SericThe
18749647Scael.Cm of
18825497Sericis only given the
18949647Scael.Ar width
19025497Sericand
19149647Scael.Ar length
19225497Sericflags.
19349647Scael.Pp
19425497SericAll other filters are called as:
19549647Scael.Bd -filled -offset indent
19649647Scael.Nm filter
19749647Scael.Fl x Ns Ar width
19849647Scael.Fl y Ns Ar length
19949647Scael.Fl n Ar login
20049647Scael.Fl h Ar host acct-file
20149647Scael.Ed
20249647Scael.Pp
20325497Sericwhere
20449647Scael.Ar width
20525497Sericand
20649647Scael.Ar length
20725497Sericare represented in pixels,
20825497Sericspecified by the
20949647Scael.Cm px
21025497Sericand
21149647Scael.Cm py
21225497Sericentries respectively.
21349647Scael.Pp
21425497SericAll filters take
21549647Scael.Em stdin
21625497Sericas the file,
21749647Scael.Em stdout
21825497Sericas the printer,
21925497Sericmay log either to
22049647Scael.Em stderr
22125497Sericor using
22249647Scael.Xr syslog 3 ,
22325497Sericand must not ignore
22449647Scael.Dv SIGINT .
22549647Scael.Sh LOGGING
22625497SericError messages generated by the line printer programs themselves
22725497Seric(that is, the
22849647Scael.Xr lp Ns *
22925497Sericprograms)
23025497Sericare logged by
23149647Scael.Xr syslog 3
23225497Sericusing the
23349647Scael.Dv LPR
23425497Sericfacility.
23525497SericMessages printed on
23649647Scael.Em stderr
23725497Sericof one of the filters
23825497Sericare sent to the corresponding
23949647Scael.Cm lf
24025497Sericfile.
24125497SericThe filters may, of course, use
24249647Scael.Xr syslog
24325497Sericthemselves.
24449647Scael.Pp
24520823SmckusickError messages sent to the console have a carriage return and a line
24620823Smckusickfeed appended to them, rather than just a line feed.
24749647Scael.Sh SEE ALSO
24849647Scael.Xr termcap 5 ,
24949647Scael.Xr lpc 8 ,
25049647Scael.Xr lpd 8 ,
25149647Scael.Xr pac 8 ,
25249647Scael.Xr lpr 1 ,
25349647Scael.Xr lpq 1 ,
25449647Scael.Xr lprm 1
25549647Scael.Rs
25649647Scael.%T "4.3 BSD Line Printer Spooler Manual"
25749647Scael.Re
25849647Scael.Sh HISTORY
25949647ScaelThe
26049647Scael.Nm
26149647Scaelfile format appeared in
26249647Scael.Bx 4.2 ..
263