Manual Page Result
0
Command: lpr | Section: 1 | Source: Digital UNIX | File: lpr.1.gz
lpr(1) General Commands Manual lpr(1)
NAME
lpr - Sends files to spooling daemon for printing
SYNOPSIS
lpr [options] filename
OPTIONS
The lpr options -c, -d, -f, -g, -l, -n, -p, -t, and -v are used to no-
tify the line printer spooler that the files are not standard text
files; therefore these options are mutually exclusive. The spooling
daemon uses the appropriate filters to print the data if you specify
one of these options.
[DIGITAL] In an international environment, the lpr command needs lo-
cale information to use the appropriate filter to print a text file.
The -A option allows you to specify, among other things, locales for
text files and printers.
The lpr command supports the following options: [DIGITAL] Specifies
one or more country-specific options, separated by spaces. For a list
of valid options, refer to the Country-Specific Options section. As-
sumes that the files contain data produced by the cifplot filter.
Specifies a print class as the request classification on the burst
page. Assumes that files contain data from tex (DVI format from Stan-
ford University). Interprets the first character of each line as a
standard FORTRAN carriage control character. Assumes that files con-
tain standard plot data as produced by plot routines. Suppresses the
printing of the burst page. Indents the output number spaces. If num-
ber is not given, the indentation is 8 spaces. Selects the input paper
tray that supplies paper for the print job. The tray name is printer
dependent. The following list shows the valid tray variable values for
the printers that support the -I option: cassette, upper, or manual up-
per, envelope_feeder, lower, or manual upper, manual, lower, or cas-
sette envelope_feeder, mmf, manual, upper, lower, or lcit front, man-
ual, upper, or lower upper, lower, or manual front, manual, or cassette
envelope_feeder, front, manual, internal, or upper
For more information on the input options, refer to the documen-
tation for your printer.
If you have one of the previously listed printers connected lo-
cally, there are two additional forms of the -I option. You can
specify the option in the form -Itray_name, where the tray_name
variable specifies the name of a tray that is supported by the
particular printer (for example, -Ilettertray). You also can
specify the option in the form -In, where the n variable speci-
fies an integer value. Refer to your printer documentation for
information on specifying valid tray selections. Causes the re-
quest ID of the printer request to be displayed on standard out-
put after it is entered in the print spooling queue. Specifies
the request name to appear on the burst page. Normally, the lpr
command uses the name of the first file. Prints the job in a
way specified by the sides variable. You can specify sides as
follows: Prints only on one side of the sheet. Prints on both
sides of the sheet; the second side is reached by flipping the
sheet about its left edge, as in the binding of a book. Prints
on both sides of the sheet, but prints the opposite way up on
each side, so the second side can be read by flipping the sheet
along its top axis. Prints only on one side of the sheet, but
retains the page layout intended for two_sided_duplex printing.
The layout refers to such things as where the margins are and
where the page numbers are. Prints only on one side of the pa-
per, but retains the page layout intended for tumble printing.
Prints on two sides of the paper, but retains the page layout
intended for one_sided_simplex printing. Prints control charac-
ters and suppresses page breaks. Sends mail (see the mailx(1)
reference page) when spooling is completed. Assumes that files
contain data output by the ditroff (device-independent troff)
command. Prints one or more pages on one sheet of paper. The
printer automatically adjusts to handle the number of pages
printed on one sheet of paper. The maximum that may be speci-
fied is 100 pages. Selects the output tray where the printed
job will be deposited. The n variable specifies an integer
value that depends on the printer. Refer to your printer docu-
mentation to determine the correct values. Prints the page in
the way specified by the orientation variable, which can be the
following: The printed output is parallel to the short side of
the page. The printed output is parallel to the long side of
the page. Formats the files using pr as a filter. Specifies
printer as the output device (print job destination). If you do
not specify the -P option, the default printer or the value of
the PRINTER environment variable is used. Removes the file when
spooling or printing is completed. Uses symbolic links to
print. Usually, files are copied to the spooling directory, but
the -s option uses symlink() to link data files, rather than
trying to copy them. This allows you to print large files. If
you specify the -s option, files should not be modified or re-
moved until they have been printed. Note that the -s option dis-
ables codeset conversion that may be necessary when printer and
file locales differ, even when you explicitly specify different
plocale and flocale values with the -A option. Assumes that
files contain data output by the troff (cat phototypesetter)
command. Specifies the title to be used by the pr command in-
stead of the filename. The -p option also must be specified.
Assumes that the files contain a raster image for devices like
the Benson Varian. Defines the page width for the pr command.
Assumes the files do not require filtering before printing.
Produces number copies of the output. Mounts the specified font
on font position 1, 2, 3, or 4, respectively.
DESCRIPTION
The lpr command uses the lpd spooling daemon to print files.
If you specify a hyphen (-) for a file name, the lpr command reads from
standard input; this can be used in conjunction with specified file
names.
If you do not specify a particular printer with the -P option, the de-
fault printer or the value of the PRINTER environment variable is used.
To check the status of a printer, use either the lpq or lpstat command.
To cancel printer requests, use the lprm or cancel command.
Country-Specific Options
[DIGITAL] The -A option allows you to specify options that are re-
quired to print files in various native languages and also supports
some country-specific printers. Each option includes a keyword, most of
which require a value assignment. See i18n_printing(5) for a general
description of country-specific support and to determine which options
may be required for particular languages and printers.
Note
You may need to use the wwlpspr command in place of the lpspr and lpr
commands when sending Asian language files to a PrintServer printer.
See wwlpspr(1) if you are sending files to a PrintServer printer.
The -A option options are supported by software installed by optional
worldwide support subsets. In other words, a country-specific option
will not work unless an associated country-specific software subset is
installed.
For the lpr command, the following options can be included through the
-A option: Specifies the locale for the source text file. Print fil-
ters use this locale to validate the characters in the text. If the
flocale option is not set, the text is interpreted in the current lo-
cale. The flocale setting is particularly important for correct inter-
pretation of characters in multibyte codesets. Moreover, if the plocale
option is also set, the lpr command automatically converts characters
from the text file codeset to the printer codeset before printing the
file. For example, the following command converts a file created in a
Traditional Chinese locale from the Big 5 codeset to the DEC Hanyu
codeset before printing it: % lpr -A "flocale=zh_TW.big5 plo-
cale=zh_TW.dechanyu" big5.txt Specifies the locale for the printer.
Some printers, like the LA380-CB, are country-specific and have builtin
fonts encoded in a particular codeset. For example, the builtin fonts
for the LA380-CB printer are encoded in DEC Hanzi. For these printers,
the codeset part of the plocale value should match the codeset
(dechanzi) of the printer's builtin fonts. Other printers are generic
and suitable for use with files in a variety of languages. For example,
the DEClaser 5100, when used with the dl5100wrof print filter, can han-
dle fonts for different codesets. For these printers, the plocale value
should match the font used in the text file. The following example
prints a file encoded in DEC Hanyu by using the Sung-Light-CNS11643
font, which supports DEC Hanyu characters: % lpr -A"font=Sung-Light-
CNS11643 plocale=zh_TW.dechanyu" \ dechanyu.txt
When the plocale value is inappropriate for the font codeset,
printed output is useless.
To determine printer locale for country-specific printers, refer
to i18n_printing(5). To find out which fonts are available for
a particular locale, refer to the reference page for the corre-
sponding codeset. For example, if locale_name is
zh_TW.dechanyu, see dechanyu(5) for a list of appropriate fonts.
Specifies the outline font name for printing source text files
on a PostScript printer. For more information, refer to the en-
try for the plocale option. Specifies the number of lines per
page. When used with the -w option, the length option can con-
trol the font size and orientation of the printed output. Spec-
ifies the path of the software on-demand loading (SoftODL) data-
base files. The odldb option overrides the default path, which
specifies the systemwide SoftODL database. Therefore, users can
set odldb to specify private SoftODL databases. For example, the
following command directs lpr to use the SoftODL database in
/usr/tmp: % lpr -A "odldb=/usr/tmp/odl"
Refer to odl(5) for more information on SoftODL. Specifies what
SoftODL font style and size to use, for example normal-24x24. If
the odlstyle is not specified, the system default SoftODL style
and size is used. Refer to odl(5) for more information on Soft-
ODL. Enables space-compensation mode for languages, such as
Thai, that contain nonspacing characters. Nonspacing characters
can combine with other characters for display and therefore do
not occupy space. Many of the existing tools for text alignment
do not handle nonspacing characters properly. If you want to
print Thai output from such utilities, you should enable space
compensation mode to ensure proper text alignment in the printed
file.
Space compensation is be done line by line. The print filter
keeps count of the number of nonspacing characters found in a
line. When two or more consecutive spaces are encountered, the
print filter inserts the appropriate number of spaces, therefore
compensating for spaces added by the nonspacing characters.
Space-compensation mode is valid only for printing Thai charac-
ters. Enables text morphing for Thai printing. Text morphing
replaces some characters with others to produce better output in
desktop publishing environments. Refer to Thai(5) for more de-
tails on text morphing. Text morphing rules are proprietary.
Therefore, text morphing is supported only by Digital Thai out-
line fonts and are available only for PostScript printing.
Specifies that Thai characters be printed on one and a half
lines, rather than on three lines, to produce more compressed
and natural looking output. The onehalf option works only with
the thailpof print filter. Refer to i18n_printing(5) for general
information on text morphing. Specifies where the character
code tables for the printer (thailpof filter only) can be found.
These tables are selected for use with the yp value in the
/etc/printcap file. The default path is /usr/lbin/tac_data.
NOTES
DIGITAL UNIX software does not include ditroff or troff. Therefore,
files suitable for use with the -n or -t options may not be available
on your system. If you try to print too large a file, the file is
truncated. The lpr command does not print binary files. If a user
other than the root user prints a file and spooling is disabled, lpr
will print a message and will not put requests in the queue. If a con-
nection to lpd on the local machine cannot be made, lpr will indicate
that the daemon cannot be started. Fonts for troff and text reside on
the host with the printer. Currently, it is not possible to use local
font libraries. DIGITAL UNIX does not supply troff, so local font li-
braries for troff may not exist on your system.
EXAMPLES
The following example prints three copies of the new.index.c, print.in-
dex.c, and more.c files: % lpr -#3 new.index.c print.index.c more.c The
following example prints three copies of the concatenated new.index.c,
print.index.c, and more.c files: # cat new.index.c print.index.c more.c
| lpr -#3 The following example prints Operations on the burst page in-
stead of the node name before printing the new.index.c file: # lpr -C
Operations new.index.c
FILES
User information Printer description file Line printer daemon Spool di-
rectories Daemon control files Data files specified in cf files Tempo-
rary copies of cf files Character encoding tables for Thai
SEE ALSO
Commands: cancel(1), checknr(1), lp(1), lpc(8), lpd(8), lpq(1),
lprm(1), lpstat(1), mailx(1), neqn(1), nroff(1), pr(1), tbl(1), wwlp-
spr(1)
Functions: symlink(2)
Others: dechanyu(5), i18n_intro(5), i18n_printing(5), l10n_intro(5),
odl(5), Thai(5)
lpr(1)