lpr

 


 
 
 
 SunOS/BSD Compatibility Package Commands                  lpr(1B)
 
 
 


NAME

lpr - submit print requests

SYNOPSIS

/usr/ucb/lpr [ -P destination ] [ -# number ] [ -C class ] [ -J job ] [ -T title ] [ -i [ indent ] ] [ -1 | -2 | -3 | -4 font ] [ -w cols ] [ -m ] [ -h ] [ -s ] [ -filter_option ] [ file ... ]

DESCRIPTION

The lpr utility submits print requests to a destination. lpr prints files (file) and associated information, collec- tively called a print request. If file is not specified, lpr assumes the standard input. The print client commands locate destination information in a very specific order. See printers(4) and printers.conf(4) for details. Print requests with more than 52 files specified will be truncated to 52 files. lpr displays a warning message.

OPTIONS

The following options are supported: -P destination Prints file on a specific printer or class of printers(see lpadmin(1M)). Specify destination using atomic, POSIX-style (server:destination), or Federated Naming Service (FNS) (.../service/printer/...) names. See printers.conf(4) for information regarding the naming conventions for atomic and FNS names, and stan- dards(5) for information regarding POSIX. -# number Prints a specific number of copies. Specify number as a positive integer. The default for number is 1. -C class Prints class as the job classification on the banner page of the output. Enclose class in double quotes if it contains blanks. If class is not specified, the name of the system (as returned by hostname) is printed as the job classifi- cation. See hostname(1). -J job Prints job as the job name on the banner page of the output. Enclose job in double quotes if it contains blanks. If job is not specified, file (or in the case of multiple files, the first file specified on SunOS 5.8 Last change: 15 Aug 1997 1 SunOS/BSD Compatibility Package Commands lpr(1B) the command line) is printed as the job name on the banner page of the output. -T title Prints a title on the banner page of the output. Enclose title in double quotes if it contains blanks. If title is not specified, file is printed on the banner page. -i indent Indents the output a specific number of SPACE charac- ters. Use indent to indicate the number of SPACE characters to be indented. Specify indent as a posi- tive integer. Eight SPACE characters is the default. -1|-2|-3|-4 font Mounts the specified font in the font position 1, 2, 3, or 4. Specify font as a valid font name. -w cols Prints file with pages of a specific width. cols indicates the number of columns wide. -m Sends mail after file has printed. See mail(1). By default, no mail is sent upon normal completion of a print request. -h Suppresses printing of the banner page of the output. -s Uses full pathnames (as opposed to symbolic links) to file rather than trying to copy them. This means file should not be modified or removed until it has com- pleted printing. Option -s only prevents copies of local files from being made on the local machine. Option -s only works with specified files. If the lpr command is at the end of a pipeline, file is copied to the spool. - filter_option Notifies the print spooler that file is not a stan- dard text file. Enables the spooling daemon to use the appropriate filters to print file. filter_options offer a standard user interface. All options may not be available for, or applicable to, all printers. Specify filter_option as a single character. If filter_option is not specified and the printer can interpret PostScriptr, inserting `%!' as the first two characters of file causes file to be interpreted SunOS 5.8 Last change: 15 Aug 1997 2 SunOS/BSD Compatibility Package Commands lpr(1B) as PostScript. The following filter_options are supported: p Use pr to format the files. See pr(1). l Print control characters and suppress page breaks. t file contains troff cat(phototypesetter) binary data. n file contains ditroff data from device indepen- dent troff. d file contains tex data from in DVI format from Stanford. g file contains standard plot data produced by plot(1B) routines. v file contains a raster image. printer must sup- port an appropriate imaging model such as PostScript in order to print the image. c file contains data produced by cifplot. f Interprets the first character of each line as a standard FORTRAN carriage control character.

OPERANDS

The following operands are supported: file The name of the file to be printed. Specify file as a pathname. If file is not specified, lpr uses the standard input. USAGE See largefile(5) for the description of the behavior of lpr when encountering files greater than or equal to 2 Gbyte ( 2 **31 bytes). EXIT STATUS The following exit values are returned: 0 Successful completion. non-zero An error occurred. SunOS 5.8 Last change: 15 Aug 1997 3 SunOS/BSD Compatibility Package Commands lpr(1B)

FILES

/var/spool/print/.seq File containing the sequence numbers for job ID assignment. /var/spool/print/[cd]f* Spooling directories and files.

ATTRIBUTES

See attributes(5) for descriptions of the following attri- butes: ____________________________________________________________ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | |_____________________________|_____________________________| | Availability | SUNWscplp | |_____________________________|_____________________________| | CSI | Enabled (see NOTES) | |_____________________________|_____________________________|

SEE ALSO

hostname(1), lp(1), lpc(1B), lpq(1B), lprm(1B), lpstat(1), mail(1), plot(1B), pr(1), troff(1), lpadmin(1M), printers(4), printers.conf(4), attributes(5), largefile(5), standards(5)

DIAGNOSTICS

lpr: destination |: unknown destination destination was not found in the LP configuration database. Usually this is a typing mistake; however, it may indicate that the destination does not exist on the system. Use lpstat -p to display information about the status of the print service.

NOTES

lpr is CSI-enabled except for the printer name. SunOS 5.8 Last change: 15 Aug 1997 4