Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ lpr(1) — Ultrix/UWS 4.0 VAX

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

lpq(1)

lprm(1)

pr(1)

symlink(2)

printcap(5)

lpc(8)

lpd(8)

lpr(1)

Name

lpr − off line print

Syntax

lpr [ options ] [ file...  ]

Description

The lpr command puts files in the spooling area used by lpd. The files are printed by lpd when the printer is available. If no file names are specified, the standard input is used.

If options are specified which would cause a conflicting action, the last option specified is the one used.  For example, in the command

lpr -h -Jjob

the −J option overrides the −h option. 

Options

−Cclass
Print the argument class, as the job classification on the banner page.  If this option is not used, the name of the node from where the lpr command was issued is printed.

−hDo not print the banner page. 

−in
Indent the printed output by n spaces.  An argument must be supplied with this option.  You should note that this is not compatible to previous versions of lpr.

−Jjob
Print the argument job, as the job name on the banner page.  If this option is not used, the job name is the name of the first file specified in the lpr command. If no file name is specified, the job name “stdin” is used.

−m
Send a mail note to you when the job has been completed.

−pFormat the files using the pr command.

−Pprinter
Send the output to the spool queue for the printer specified.  If this option is not used, the output is sent to the spool queue defined by the PRINTER environment variable.  If a queue is not defined by the PRINTER environment variable, the output is sent to the default printer. 

−sUse the symlink system call to link data files, rather than trying to copy them. This can be used if the file size exceeds the spool directory limit. Refer to the mx capability in printcap(5). Note that the files should not be modified or removed until they have been printed.

−Ttitle
Print the argument title at the head of each page.  If a title is not specified, the name of the file is used.  If no file name is specified, then the title part of the header is left blank.  The −T option is only meaningful with the −p option. 

−wn
Print the job using a page width of n characters.  If this option is not used, the page width is taken from the printcap file. If there is no entry in the printcap file, the page width used is 132 characters.

−zn
Print the job using a page length of n lines.  If this option is not used, the page length  is taken from the printcap file. If there is no entry in the printcap file, the page length used is 66 lines.

−1font

−2font

−3font

−4font
Use the font file specified by font in font position 1, 2, 3 or 4.  These options can only be used with troff, ditroff and TeX files (the −n, −t, and −d options respectively). 

−#n
Print n copies of the specified file(s). 

The following options are for use with PostScript (TM) printers with specialized support, refer to lpd(8). Each option requires one argument. The arguments can be abbreviated as long as the abbreviations are unique for each option.

−Ddatatype
Define the data type to the print daemon, lpd. If the −D option is not used, the data type is taken from the printcap file. If no entry for the data type is found in the printcap file, the print job is sent to the printer without translation. The following are valid arguments for the −D option. 

ansi ANSI data
ascii ASCII data
postscript PostScript (TM) data
regis REGIS data
tek4014 Tektronix 4014
xyz You can specify other data types, but you must write an appropriate translator, refer to xlator_call(8).

−Fpagesize
Select the size of the pages to be printed. The page size is the text intended to be printed on a separate sheet. If the −F option is not used the page size used is the same as the sheet size, refer to option −S.  If the sheet size is not specified, the value is taken from the printcap file. If there is no entry in the printcap file, the page size is LETTER (8.5 x 11 inches). The −F option is ignored if the data type is PostScript (TM).  The following are valid arguments for the −F option. 

letter or a 8.5 x 11 inches, 216 x 279 mm
ledger or b 11 x 17 inches, 279 x 432 mm
legal 8.5 x 14 inches, 216 x 356 mm
executive 7.5 x 10.5 inches, 191 x 254 mm
a5 5.8 x 8.3 inches, 148 x 210 mm
a4 8.3 x 11.7 inches, 210 x 297 mm
a3 11.7 x 16.5 inches, 297 x 420 mm
b5 7.2 x 10.1 inches, 176 x 250 mm
b4 10.1 x 14.3 inches, 250 x 353 mm

−Itray
Select the input paper tray that will supply paper for the print job. The tray name is given by the argument as follows:

top The upper 250-sheet input tray. 
middle The middle 250-sheet input tray. 
bottom or lcit The large capacity input tray. 

If the −I option is not used, the −S option to selects the input tray.  If the −I option and the −S option are both specified, the input tray must contain the required paper size.  If the −I option is not specified, the value for the output paper tray is taken from the printcap file. If no entry is present there, the default paper tray for the printer is used.

−Ksides
Print the pages of the job on sheets in the way specified by sides.  The valid arguments are:

1 or one_sided_simplex Print on one side of the sheet only. 
2 or two_sided_duplex Print 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 Print on both sides of the sheet, but print 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 Print on one side of the paper only, but retain 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 Print on one side of the paper only, but retain the page layout intended for tumble printing. 
two_sided_simplex Print on two sides of the paper of the paper, but retain the page layout intended for one sided simplex. 

−Lfilename
Use the commands in the layup definition file, specified by filename, to alter the appearance of the printed output.  If filename does not begin with /, the current directory is searched, followed by /usr/lib/lpdfilters. Refer to the documentation for your printer for the commands available.

−Mmessage
Use the messages generated by the print job in the way specified by message.  If the −M option is not used, messages are not recorded, unless indicated by an entry in the printcap file.

keep Record the messages in the message file and mail the file to you. 
ignore Do not record messages. 

−Nn
Print n pages on a single sheet.  The number must be in the range 0 to 100.  If you specify lpr −N0 the /etc/printcap entry is overridden and the default layup file is not used. If you specify lpr −N1 the pages are printed “1-up” but with a border.  If the −N option is not used, one page is printed on one sheet. 

−otray
Select the output tray where the printed job will be deposited. The tray name is given by the argument as follows:

top Top tray, with face-down stacking. 
side Side tray, with face-down stacking. 
face-up Side tray, with face-up stacking. 
upper Upper tray if there are two trays on top of the printer.  If there are not two trays, the top tray is used. 
lower Lower tray if there are two trays on top of the printer.  If there are not two trays, the top tray is used. 
lcos Large capacity output stacker

If the −o option is not specified, the value for the input paper tray is taken from the printcap file, and if no entry is present there, from the printer.

−Oorientation
Print the page in the way specified by orientation.  The orientation is given by the argument as follows:

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. 

If the −O option is not specified, the value orientation is taken from the printcap file, and if no entry is present there, from the printer.

−Spagesize
Select the physical size of the sheets to be printed. If the −S option is not used the sheet size used is the same as the page size, refer to option −F.  If the page size is not specified, the value is taken from the printcap file. If there is no entry in the printcap file the sheet size is LETTER (8.5 x 11 inches). The valid arguments for the −S option are the same as for the −F option. 

−Xn
Print each page n times.  The number must be in the range 1 to 100.  The output is uncollated, for a collated output use the −# option.  If the −X option is not used, each page is printed once. 

−Zlowlim,uplim
Print the pages of the job between lowlim and uplim.  If lowlim is not specified, the first page printed is the first page of the job.  If uplim is not specified, the last page printed is the last page of the job.  The maximum value which can be specified for uplim is 10000.  Banner pages are not included in the count.  Note that these limits apply to the entire print job, not to individual files within a multi-file job. 

The following options are used to notify the spooling daemon for the printer that the files are not standard text files.  Any of these options will override the −D option regardless of the order in which they appear.  The lpd print daemon uses the appropriate filters to ensure the files are printed correctly.

−gAssume the files contain standard plot data produced by the plot routines.

−lPrint the files using a filter which prints the control characters and suppresses the page breaks. 

−tAssume the files contain data produced by troff. 

−xAssume the files do not require filtering before printing. 

The following options also notify the spooling daemon for the printer that the files are not standard text files.  The lpd filters for the following options are not supplied as part of the standard ULTRIX operating system.

−cAssume the files contain data produced by cifplot. 

−dAssume the files contain data produced by TeX (DVI output from Stanford). 

−fInterpret the first character of each line as a standard FORTRAN carriage control character. 

−nAssume the files contain data produced by device independent troff (ditroff). 

−vAssume the files contain a raster image for devices like Versatec. 

Restrictions

Fonts for troff and TeX reside on the host with the printer.  It is not possible to use local font libraries. 

Diagnostics

Files with more than x bytes are truncated to x bytes.  The default value for x is 1025024 bytes, but this can be changed by using the mx capability in the /etc/printcap file. The lpr command will not print files which appear to be in a.out or ar format. If a user other than root prints a file and spooling is disabled, lpr will print a disabled message and will not put jobs in the queue. If a connection to lpd on the local machine cannot be made, lpr will print that the daemon cannot be started.

Files

/etc/passwd Personal identification

/etc/printcap Printer capabilities data base

/usr/lib/lpd Line printer daemon

/usr/spool/* Directories used for spooling

/usr/spool/*/cf* Daemon control files

/usr/spool/*/df* Data files specified in "cf" files

/usr/spool/*/tf* Temporary copies of "cf" files

See Also

lpq(1), lprm(1), pr(1), symlink(2), printcap(5), lpc(8), lpd(8)

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026