 |
Index for Section 1 |
|
 |
Alphabetical listing for L |
|
 |
Bottom of page |
|
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 notify
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.
In an international environment, the lpr command needs locale 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:
-Akeyword_list
Specifies one or more keywords and keyword assignments, separated by
spaces. For a list of valid keywords, refer to the "Country-Specific
Options" section.
-Busername
Enables you to specify a username which will appear as the banner on
the print job.
-c Assumes that the files contain data produced by the cifplot filter.
-C class
Specifies a print class as the request classification on the burst
page.
-d Assumes that files contain data from tex (DVI format from Stanford
University).
-f Interprets the first character of each line as a standard FORTRAN
carriage control character.
-g Assumes that files contain standard plot data as produced by plot
routines.
-h Suppresses the printing of the burst page.
-i[number]
Indents the output number spaces. If number is not given, the
indentation is 8 spaces.
-Itray
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:
ln05 and ln05r printers:
cassette, upper, or manual
ln06 and ln06r printers:
upper, envelope_feeder, lower, or manual
ln07 and ln07r printers:
upper, manual, lower, or cassette
ln08 and ln08r printers:
envelope_feeder, mmf, manual, upper, lower, or lcit
ln14 printer:
front, manual, upper, or lower
ln10ja (Japanese-specific) printers:
upper, lower, or manual
For more information on the input options, refer to the documentation
for your printer.
If you have one of the previously listed printers connected locally,
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 specifies an integer value. Refer to your
printer documentation for information on specifying valid tray
selections.
-j Causes the request ID of the printer request to be displayed on
standard output after it is entered in the print spooling queue.
-J name
Specifies the request name to appear on the burst page. Normally, the
lpr command uses the name of the first file.
-Ksides
Prints the job in a way specified by the sides variable. You can
specify sides as follows:
1 or one_sided or one_sided_simplex
Prints only on one side of the sheet.
2 or two_sided or two_sided_duplex
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.
tumble or two_sided_tumble
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.
one_sided_duplex
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.
one_sided_tumble
Prints only on one side of the paper, but retains the page layout
intended for tumble printing.
two_sided_simplex
Prints on two sides of the paper, but retains the page layout
intended for one_sided_simplex printing.
-l Prints control characters and suppresses page breaks.
-m Sends mail (see the mailx(1) reference page) when spooling is
completed.
-n Assumes that files contain data output by the ditroff (device-
independent troff) command.
-Nnumber
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 specified is 100 pages.
-on 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 documentation to determine the correct values.
-Okeyword-list or -Okeyword
Specifies one or more keywords, among them keywords for page
orientation, that may be print filter specific. The choices for page
orientation are:
portrait
The printed output is parallel to the short side of the page.
landscape
The printed output is parallel to the long side of the page.
Currently, only the pcfof and wwpsof print filters support additional
keywords. See the description of the -O option in the wwpsof(8)
reference page for the list of additional keywords and keyword
assignments you can specify.
The keyword-list argument is a comma-separated (no embedded spaces)
list of keywords, keyword assignments, or both. As an alternative to
listing multiple keywords after the same -O option, your command line
can include multiple instances of the -O option, each with a different
keyword or keyword assignment.
You cannot use the -O option to specify keywords other than portrait or
landscape if you are printing to a remote system that is running a
Tru64 UNIX version earlier than Version 5.0.
-p Formats the files using pr as a filter. If you specify the -T option
you must also specify the -p option.
-Pprinter
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.
-r Removes the file when spooling or printing is completed.
-s 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
removed until they have been printed. Note that the -s option is
disabled if codeset conversion is performed.
-t Assumes that files contain data output by the troff (cat
phototypesetter) command.
-T title
Specifies the title to be used by the pr command instead of the
filename. The -p option also must be specified, otherwise the -T
option is ignored.
-v Assumes that the files contain a raster image for devices like the
Benson Varian.
-wnumber
Prints the job using the page width in columns specified by the
argument number. If this option is not specified, the page width is
taken from the /etc/printcap file.
-x Assumes the files do not require filtering before printing.
-znumber
Prints the job using the page length in lines specified by the argument
number. If this option is not specified, the page length is taken from
the /etc/printcap file.
-#number
Produces number copies of the output.
-1 font, -2 font, -3 font, -4 font
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 default
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
The -A option allows you to specify information that is required to print
files in various native languages and also supports some country-specific
printers. You specify this information by using keywords, most of which
require value assignments. See i18n_printing(5) for a general description
of country-specific support and to determine which keywords may be required
for particular languages and printers.
The -A option keywords are supported by software installed by optional
worldwide support subsets. In other words, a country-specific keyword will
not work unless an associated country-specific software subset is
installed.
For the lpr command, the following keywords can be included through the -A
option:
flocale=locale_name
Specifies the locale for the source text file. If this is not a valid
locale name, it will be interpreted as a codeset name. Print filters
use a codeset name or the codeset part of a locale name to this locale
to validate the characters in the text. If the flocale keyword is not
set, the text is interpreted in the codeset of the current locale. The
flocale setting is particularly important for correct interpretation of
characters in multibyte codesets. Moreover, if the plocale keyword 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 plocale=zh_TW.dechanyu" big5.txt
If you are printing to a printer controlled by the wwpsof filter, it is
recommended that you set locale for a print job by using the -Olocale-
name option. See the wwpsof(8) reference page for more information.
plocale=locale_name
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 wwpsof print filter, can handle 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 corresponding
codeset. For example, if locale_name is zh_TW.dechanyu, see
dechanyu(5) for a list of appropriate fonts.
font=font_name
Specifies the outline font name for printing source text files on a
PostScript printer. For more information, refer to the entry for the
plocale keyword.
length=number_of_lines
Specifies the number of lines per page. When used with the -w option,
the length keyword can control the font size and orientation of the
printed output.
odldb=odl_database_path
Specifies the path of the software on-demand loading (SoftODL) database
files. The odldb keyword setting 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.
odlstyle=style-NxN
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
SoftODL.
spcom
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 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 characters.
tm 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 details on text morphing. Text
morphing rules are proprietary. Therefore, text morphing is supported
only by our Thai outline fonts and are available only for PostScript
printing.
onehalf
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 keyword works only with the thailpof print
filter. Refer to i18n_printing(5) for general information on text
morphing.
tacdata=tac_data_path
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.
vprint
Specifies vertical printing mode for ideographic characters in the
Chinese, Japanese, and Korean languages. In vertical printing mode,
any single-byte characters that files contain are still printed in
horizontal printing mode.
If you are using a printer controlled by the wwpsof filter, it is
recommended that you use the -Ovprint option to specify vertical
printing. See the wwpsof(8) reference page for more information.
NOTES
1. Tru64 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.
2. 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 connection to lpd on the
local machine cannot be made, lpr will indicate that the daemon cannot
be started.
3. Fonts for troff and text reside on the host with the printer.
Currently, it is not possible to use local font libraries. Tru64 UNIX
does not supply troff, so local font libraries for troff may not exist
on your system.
EXAMPLES
1. The following example prints three copies of the new.index.c,
print.index.c, and more.c files:
% lpr -#3 new.index.c print.index.c more.c
2. 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
3. The following example prints Operations on the burst page instead of
the node name before printing the new.index.c file:
# lpr -C Operations new.index.c
FILES
/etc/passwd
User information
/etc/printcap
Printer description file
/usr/lbin/lpd
Line printer daemon
/usr/lbin/lpr
The executable image
/var/spool/*
Spool directories
/var/spool/*/cf*
Daemon control files
/var/spool/*/df*
Data files specified in cf files
/var/spool/*/tf*
Temporary copies of cf files
/usr/lbin/tac/tac_data/*
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), wwpsof(8)
Functions: symlink(2)
Others: dechanyu(5), i18n_intro(5), i18n_printing(5), l10n_intro(5),
odl(5), Thai(5)
 |
Index for Section 1 |
|
 |
Alphabetical listing for L |
|
 |
Top of page |
|