Switch to SpeakEasy.net DSL

The Modular Manual Browser

Home Page
Manual: (OSF1-V5.1-alpha)
Apropos / Subsearch:
optional field

lpr(1)								       lpr(1)


  lpr -	Sends files to spooling	daemon for printing


  lpr [options]	filename


  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; there-
  fore 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:

      Specifies	one or more keywords and keyword assignments, separated	by
      spaces. For a list of valid keywords, refer to the "Country-Specific
      Options" section.

      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

  -d  Assumes that files contain data from tex (DVI format from	Stanford

  -f  Interprets the first character of	each line as a standard	FORTRAN	car-
      riage control character.

  -g  Assumes that files contain standard plot data as produced	by plot	rou-

  -h  Suppresses the printing of the burst page.

      Indents the output number	spaces.	If number is not given,	the indenta-
      tion 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:

      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 selec-

  -j  Causes the request ID of the printer request to be displayed on stan-
      dard 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.

      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

      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.

	  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 paper,	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.

  -l  Prints control characters	and suppresses page breaks.

  -m  Sends mail (see the mailx(1) reference page) when	spooling is com-

  -n  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 automati-
      cally 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 orienta-
      tion, that may be	print filter specific. The choices for page orienta-
      tion are:

	  The printed output is	parallel to the	short side of the page.

	  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) refer-
      ence 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.

      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 spool-
      ing 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 photo-
      typesetter) 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 Ben-
      son Varian.

      Prints the job using the page width in columns specified by the argu-
      ment 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.

      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.

      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.


  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

  For the lpr command, the following keywords can be included through the -A

      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.

      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	plo-
      cale 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 charac-
	   % lpr -A"font=Sung-Light-CNS11643 plocale=zh_TW.dechanyu" \

      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 particu-
      lar 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.

      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.

      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.

      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.

      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 Sof-

      Enables space-compensation mode for languages, such as Thai, that	con-
      tain 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	char-
      acters properly.	If you want to print Thai output from such utilities,
      you should enable	space compensation mode	to ensure proper text align-
      ment 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 Compaq Thai outline fonts	and are	available only for PostScript

      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

      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

      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 hor-
      izontal 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 print-
      ing. See the wwpsof(8) reference page for	more information.


   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.


   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


      User information

      Printer description file

      Line printer daemon

      The executable image

      Spool directories

      Daemon control files

      Data files specified in cf files

      Temporary	copies of cf files

      Character	encoding tables	for Thai


  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)