lpr

 


 LPR(1)                                                     LPR(1)
 
 
 

NAME

lpr - off line print

SYNOPSIS

lpr [ -A ] [ -B ] [ -b,l ] [ -C class ] [ -D debugopt ] [ -F filterformat ] [ -G ] [ -h ] [ -i indentcols ] [ -k ] [ -J job ] [ -K,# copies ] [ -m mailTo ] [ -o options ] [ -P printer ] [ -Q ] [ -r ] [ -R remoteAccount ] [ -s ] [ -T title ] [ -U user ] [ -V ] [ -w width ] [ -X userfile ] [ -Y ] [ -Z options ] [ -1,2,3,4 font ] [ filename ... ]

DESCRIPTION

Lpr uses a spooling daemon to print the named files when facilities become available. If no names appear, the standard input is assumed.

OPTIONS

-A The authentication type is set by the value of the AUTH environment variable. -B Do filtering of job files by the filters specified by the printcap. Combine the output of the filtering operation into a single job file and then send the single file to the lpd print spooler. -C class Specify the job classification for use on the burst page and to set the priority. Priorities range from A (lowest) to Z (highest); the default priority is A. For example, lpr -C B foo.c sets the priority/class to B and the file foo.c is printed. -D debugoptions Debugging is controlled using the -D option. This accepts a comma-separated list of debugging settings. These settings take one of two forms: facility=value, or value to set an overall default value. -F filterformat Filter or format specification. By default, input is assumed to a standard text file and the f format is used; the output device is assmed to be a simple line printer. Other formats available are listed below. Not all formats may be available on all printers; see printcap(5) for details. Formats are single lower case letters; the following are the valid arguments for -F together with the assumed type of data. For compatibility with previous versions of lpr, the for­ mat types can be used as options themselves (i.e. by omitting the F) except where noted below, a warning may be issued in such cases. -b, -l either of these flags specifies a binary or lit­ eral file, and no processing is to be done. Printed using the f format filter, with process­ ing suppressed. -c data produced by cifplot(l). -d output from tex(l) (DVI format from Stanford). -g standard plot data as produced by the plot(3X) routines (see also plot(1G) for the filters used by the printer spooler). -n output from (device independent) troff. -p First use pr(1) to format the files, then print using f format. -r The DREADED REMOVE AFTER PRINTING option. Beware, for lpr will delete the files after spooling them. Present by demand from users for compatibility with other Berkeley lpr implemen­ tation, but really should NOT be present. -t output from troff(1) (originally cat phototype­ setter commands, but now we assume the same as the n format). -v a raster image for devices like the Benson Var­ ian. -G Similar to the -B option, but only processes individ­ ual files. -h No banner or header for this job. -i indentcols Indent input by indentcols. Note that this option is not supported on all printers. -J jobname Specify the job name to print on the burst page; defaults to the name of the first file in job or (STDIN) if input is from a pipe. -k When used as a filter, lpr normally creates a tempo­ rary file for the input read from stdin before send­ ing it to the remote printer. The -k causes the job to be sent directly to the server. If you kill the job in the middle of creation, then the partly trans­ ferred file will get printed. This option may not work with very large jobs or non-LPRng spoolers. -Kcopies, -#copies Specify the number of copies of each file to be printed. -m mailTo Send mail upon unsuccessful completion to user mailTo. -P printer By default, the destination printer is taken from the command line printer value, then the environment variables PRINTER, LPDEST, NPRINTER, NGPRINTER, then first entry in the printcap information, and and finally the default_printer entry from the configura­ tion file, and then the compile time default. -Q Put the name of the spool queue into the job file. This information can then be used by the spooling software to control output format. -R remoteAccount Specify accounting information to be used by a remote system that prints your output. This parameter can be used to specify a billing code to be charged for the printing. -s This flag is included for compatibility with other versions of lpr. In these versions it will create a symbolic link to the files to be printed. Lpr now sends files directly to the server and it is irrele­ vant. -T title Specify the title used by pr(1); defaults to the file name. -U username The -U option is used to specify a user name for the job. This is available only to ROOT or users listed in the allow_user_setting configuration option. This is obviously a security loophole, but it is present to allow systems such as SAMBA to submit jobs on behalf of users. See Authenticated Transfers below. -V Verbose mode. Additional -V flags increase verbosity. Use debug flags for extreme verbosity. -w width Specify the page width for printing the job. -X path User specified filter for job files. Processing is done on the client host. -Y Make a direct connection to the printer device and do not spool. -Z options -o options Pass the specified options to the print spooler. Used when additional or specialized information must be provided to the spooler. -1,2,3,4fontname Specify a font to be mounted on font position i for TROFF printing (Obsolete). FILENAMES By default, if no filenames are specified lpr will read stdin and print it. AUTHENTICATED TRANSFERS The original LPR network protocol defined in RFC1179 did not provide for user to server authentication. This is now supported by LPRng. See the LPRng support documenta­ tion for details on its operation and support. COMPATIBILITY The LPRng version of lpr attempts to be functionaly com­ patible with common implementations of lpr. However, there are some commands and functionality that are delib­ erately missing. -s Symbolic Links (Berkeley LPR) This option specified that a symbolic link to the original data file rather than a copy of the data file was to be used when spooling jobs. This opens up a variety of security problems, as well as being ineffective when printing to a remote host. THE -B, -Y, -X filter ULTRA-LIGHTWEIGHT PRINTING OPTIONS LPRng supports ultra-lightweight printing by eliminating the need for a print spooler. This is quite dangerous, but makes the lpr client very lightweight. The -Y command line option and the :direct printcap option enables lpr to connect directly to a specified port or use a program to send a job. This filter also enables client side filter­ ing, so if there are any filters specified in the print­ cap entry they will be used. For example: lpr -Y -Phost%port file1 file2 ... approximately equivalent to: for i in file1 file2 ...; do ${filter} <$i; # where ${filter} is filter from printcap done >host%port (TCP/IP connection) lpr -Y -Phost%port -X userfilter file1 file2 ... approximately equivalent to: for i in file1 file2 ...; do userfilter <$i; done >host%port (TCP/IP connection) Summary: -P host%port > TCP/IP connection to host%port -P /dev/lp > /dev/lp -P '|/program' | /program SPECIAL CASE lpr -Y -Ppr@host -X userfilter file1 file2 ... approximately equivalent to: for i in file1 file2 ...; do userfilter <$i >temp.$i; done lpr -Ppr@host temp.file1 temp.file2 The -B option or the :lpr_bounce is used to filter and make a single file out of a set of print files and then forward them. lpr -B -Ppr@host approximately equivalent to: lpr -Y -P/tmp/tempfile file1 file2 ... lpr -Ppr@host /tmp/tempfile You can also use a printcap entry and the :direct options. Printcap: lp:direct:lp=h14%9100:remote_support=R lpr -Plp file1 file2 Same as: lpr -Plp -Y -Ph14%9100 file1 file2 The :remote_support option is used to prevent the lpq and lpc program from attempting to send jobs to the device. ENVIRONMENT By default, the destination printer is taken from the com­ mand line dest value, then the environment variables PRINTER, LPDEST, NPRINTER, NGPRINTER, then first entry in the printcap information, and and finally the default_printer entry from the configuration file, and then the compile time default. EXIT STATUS The following exit values are returned: zero (0) Successful completion. non-zero (!=0) An error occurred. PRINTCAP INFORMATION The printer names and other information is obtained by using a printcap file or some other database. The ${HOME}/.printcap file can be used to specify user level options and configuration information. See printcap(5) for more information.

FILES

The files used by LPRng are set by values in the printer configuration file. The following are a commonly used set of default values. /etc/lpd.conf LPRng configuration file ${HOME}/.printcap user printer description file /etc/printcap system printer description file /etc/lpd.perms printer permissions /var/spool/printer* spool directories /var/spool/printer*/printer lock file for queue control /var/spool/printer*/control.printer queue control /var/spool/printer*/active.printer active job /var/spool/printer*/log.printer log file

SEE ALSO

lpd.conf(5), lpc(8), lpd(8), checkpc(8), lpq(1), lprm(1), checkpc(8), printcap(5), lpd.perms(5), pr(1). DIAGNOSTICS Most of the diagnostics are self explanatory. If you are puzzled over the exact cause of failure, set the debugging level on (-D5) and run again. The debugging information will help you to pinpoint the exact cause of failure. HISTORY LPRng is a enhanced printer spooler system with function­ ality similar to the Berkeley LPR software. The LPRng mailing list is lprng@lprng.com; subscribe by sending mail to lprng-request@lprng.com with the word subscribe in the body. The software is available from ftp://ftp.astart.com/pub/LPRng.

AUTHOR

Patrick Powell <papowell@lprng.com>. LPRng LPRng-3.7.4 LPR(1)