Manual Page Result
0
Command: printcap | Section: 4 | Source: Digital UNIX | File: printcap.4.gz
printcap(4) Kernel Interfaces Manual printcap(4)
NAME
printcap - Printer capability data base
SYNOPSIS
/etc/printcap
DESCRIPTION
The printcap file is used to describe printer characteristics. The
format of the printcap file is a simplified version of the /etc/termcap
database format.
The lpd line printer daemon accesses the /etc/printcap file every time
a file is passed to the spooler for printing. The print spooling system
uses the printcap file to obtain information about each printer at-
tached to the system and about remote printers. Each entry in the
printcap file describes a single printer.
When the local line printer driver supports indentation, the lpd line
printer daemon must understand how to invoke this capability.
The default printer for your system usually has the device reference
lp, although environment variable PRINTER can be used to override the
default printer reference. The print commands (for example, lpr, lpq,
and lprm) support the -Pprinter option, which enables you to specify a
specific printer.
Printer Characteristic Symbols
Each printer has various characteristics that tell the lpd line printer
daemon how to communicate with the printing device defined in the /dev
directory. A table in this section lists the printer characteristic
symbols and provides the following information for each: The symbol,
which is a 2-character mnemonic. The symbol must be specified exactly
as it appears in this column. Type of data expressed by the entry as
str, num, or bool. When the characteristic defined by the symbol is
referenced as a string variable (str) in the Type column, it must be
followed by an = (equal sign) together with a string value; when you do
not define the string value, it either remains a NULL string and con-
tains no data or takes the value specified in the Default column. When
the Type column defines a symbol type as bool, it may only be logically
true (yes) or logically false (no).
When the parameter you define is a numerical variable, it must
be followed with a # (pound sign) together with the numerical
value you assign; when you do not define the numerical parameter
it takes the value specified in the Default column of the table.
A summary of the printer characteristic that the symbol speci-
fies.
Symbols whose descriptions are followed by "(I18N)" are provided
to meet country-specific printing requirements. Refer to
i18n_printing(5) for information about when these symbols are
valid in a printer entry.
The following is an example of a printcap entry:
myprinter|lp0:\
:af=/usr/adm/lpacct:\
:br#9600:\
:ct=dev:\
:fc#0177777:\
:fs#023:\
:if=/usr/lbin/la75of:\
:lf=/usr/adm/lperr:\
:lp=/dev/tty00:\
:mx#0:\
:of=/usr/lbin/la75of:\
:pl#66:\
:pw#80:\
:sd=/usr/spool/lpd:\
:xc#0177777:\
:xf=/usr/lbin/xf:\
:xs#044000:
Entries can continue onto multiple lines by specifying the back-
slash (\) as the last character of a line. Empty fields can be
included for readability (here between the last field on a line
and the first field on the next line).
Comments can be included on lines beginning with the pound sign
(#).
tab(@); lfHB lfHB lfHB lfHB l1 l1 l lw(2.5i). _
Name@Type@Default@Description
_
af@str@NULL@Name of accounting file br@num@none@T{ If lp is a tty, set
the baud rate (ioctl call). T} cf@str@NULL@The cifplot data filter.
ct@str@dev@T{ The connection type. Only valid when up=psv4.0. The
choices are: dev, LAT, and remote. (Required for LAT printers.) T}
ct@str@LAT@T{ Remote printing using LAT as the transport. T}
df@str@NULL@The tex data filter (DVI format). fc@num@0@T{ If lp is a
tty, clear flag bits (sgtty.h). T} ff@str@\f@String to send for a form
feed. fo@bool@false@Print a form feed when the device is opened.
fs@num@0@Like fc, but set bits. gf@str@NULL@The graph data filter
(plot format). hl@bool@false@Print the burst header page last.
ic@bool@false@T{ Driver supports (non standard) ioctl to indent print-
out. T} if@str@NULL@Name of text filter that does accounting.
lf@str@/dev/console@Error logging filename. lo@str@lock@Name of lock
file. lp@str@/dev/lp@T{ Device name to open for output. (Required for
LAT and remote printers.) T} mx@num@1000@T{ Maximum file size (in BUF-
SIZ blocks). Zero = unlimited. T} nf@str@NULL@T{ The ditroff data fil-
ter (for device independent troff). T} of@str@NULL@Name of output fil-
tering program. pl@num@66@Page length (in lines). pw@num@132@Page
width (in columns). px@num@0@Page width in pixels (horizontal).
py@num@0@Page length in pixels (vertical). rf@str@NULL@T{ Filter for
printing FORTRAN style text files. T} rm@str@NULL@T{ Machine name for
remote printer. (Required for remote printers.) T} rp@str@lp@T{ Remote
printer name argument. (Required for remote printers.) T}
rs@bool@false@Restrict remote users to those with local accounts.
rw@bool@false@T{ Open the printer device for reading and writing. T}
sb@bool@false@Short banner (one line only). sc@bool@false@Suppress
multiple copies. sd@str@/usr/spool/lpd@T{ Spool directory. (Required
for LAT and remote printers.) T} sf@bool@false@Suppress form feeds.
sh@bool@false@Suppress printing of burst page header. st@str@sta-
tus@Status filename. tf@str@NULL@T{ The troff data filter (for the cat
phototypesetter). T} tr@str@NULL@T{ Trailer string to print when queue
empties. T} vf@str@NULL@The raster image filter. xc@num@0@T{ If lp is
a tty, clear local mode bits (tty). T} xf@str@NULL@Pass-through fil-
ter. xs@num@0@Like xc, but set bits. ya@str@NULL@Additional parame-
ters for print filter (I18N). yd@str@NULL@Secondary device name for
font faulting (I18N). yj@str@NULL@Restart of for every job (I18N).
yp@str@NULL@Printer ID conforming to Wototo standard (I18N).
ys@num@0@Size of SoftODL character cache (I18N). yt@str@"fifo"@SoftODL
character replacement strategy (I18N).
_
When the local line printer driver supports indentation, the lpd line
printer daemon must understand how to invoke this capability.
LAT Printing Characteristics
The following table lists the LAT printing characteristics:
tab(@); lfHB lfHB lfHB lfHB l l l l. _
Name@Type@Default@Description
_ ct@str@LAT@Remote printing using LAT as the @@@transport.
lp@str@/dev/ttyWX@T{ Device name to open for output where WX is a LAT
device. T}
_
Filter and Flags
The lpd line printer daemon creates a pipeline of filters to process
files for various different printer device. The filters you select de-
pend on the flags that are passed to the lpr command. The pipeline
setup is:
tab(@); lfHB lfHB lfHB lb lb l. _
Flag@Filter@Description
_ none@if@regular text -p@pr | if@regular text + pr -c@cf@cifplot
-d@df@DVI (tex) -g@gf@plot -n@nf@ditroff -f@rf@FORTRAN -t@tf@troff
-v@vf@raster image
_
The if filter is invoked with arguments according to the following for-
mat:
if [-c] -wwidth -llength -iindent -nlogin -hhost acct-file
The xf pass-through filter is specified when output is preformatted and
does not require special filtering.
The -c flag is passed only when the -l flag (pass control-characters
literally) is specified to the lpr command. The -wwidth and -llength
parameters specify the page width and length (from the assigned or de-
fault values of pw and pl respectively in the printcap file) in charac-
ters. The -n and -h flags specify the login name and hostname of the
owner of the job, respectively. The acct-file is passed from the af en-
try in the printcap file.
The if filter is opened for all individual jobs, which makes it suit-
able for accounting. When the if filter is not specified, the system
uses the of filter as the default value. The of filter however, is
opened only once and is only given the -wwidth and -llength flags.
All other filters are called according to the following format:
filter -xwidth -ylength -nlogin -h host acct-file
In this format, -xwidth and -ylength are represented in pixels as spec-
ified by the px and py entries, respectively, in the printcap file.
All filters take standard input (stdin) as the source file and standard
output (stdout) as the destination. The printer may log either to
standard error (stderr) or use syslogd, and must not ignore the SIGINT
signal.
ERROR LOGGING
Error messages generated by the line printer programs (that is, the lp*
programs) are logged by syslogd using the lpr facility. Messages
printed on the stderr of one of the filters are sent to the correspond-
ing lf file specified in the printcap file. The filters may, of
course, also use syslogd.
Error messages sent to the console have a carriage return and a line
feed appended to them, rather than just a line feed.
RELATED INFORMATION
Commands: lpq(1), lpr(1), lprm(1), lpc(8), lpd(8), lprsetup(8), pac(8)
Files: termcap(4)
Others: i18n_printing(5)
System Administration
Network Administration delim off
printcap(4)