LP(1)

NAME
lp - send requests to an LPRng print service

SYNOPSIS
lp [ -A ] [ -c ] [ -m ] [ -p ] [ -s ] [ -w ] [ -d dest ]
[ -f form-name [ -d any ] ] [ -H special-handling ]
[ -n number ] [ -o option ] [ -P page-list ]
[ -q priority-level ] [ -S character-set [ -d any ] ]
[ -S print-wheel [ -t title ]
[ -T content-type [ -r ] ] [ -y mode-list ]
[ -D debug-options ]
[ file... ]

DESCRIPTION

The LPRng lpr client supports an lp interface when invoked with the lp program name. This is usually done by making a symbolic link to the lpr program with the name lp. This is similar to the ex(1) and vi(1) programs. The supported form of the lp command arranges for the named file(s) and associated information (collectively called a request) to be printed. If no file names are specified on the command line, the standard input is assumed. The standard input may be specified along with a named file(s) on the command line by listing the file name(s) and specifying `-' (dash) for the standard input. The files will be printed in the order in which they appear on the shell command line.

The LP print service associates a unique request-ID with each request and displays it on the standard output. The job number portion or full request-ID can be used later with cancel(1) or lprm(1) when canceling a job or when determining its status. See cancel(1) and lprm(1) for details about canceling a request, and lpstat(1) and lpq(1) for information about checking the status of a print request.

OPTIONS

Options to lp always precede any file names, but may be specified in any order. The following options are available for lp:

-A  Use authenticated transfer. Note that this is not a standard lp(1) option but has been added for compatibilty with LPRng.

-c  Make a copy of the file before printing. (This has no effect as LPRng always sends jobs immediately to the remote server for printing.)

-d dest
    Choose dest as the printer or class of printers that is to do the printing. By default, dest is taken from the environment variable LPDEST (if it is set), and then PRINTER . Otherwise, a default destination (if one exists) for the computer system is used.

-f form-name
    Print the request on the form form-name. The first letter of the form-name option is used as the LPRng filter format. This is similar to the lpr -F option.

-H special-handling
    These options are ignored.

-m  Send mail (see mail(1)) after the files have been printed. The mail address is taken from the USER enviroment variable. By default, no mail is sent upon normal completion of the print request.

-n number
    Print number copies (default is 1) of the output.

-o option
    Specify printer-dependent options. Several such options may be collected by specifying the -o keyletter more than once (-o $option sub 1$ -o $option sub 2$ ... -o $option sub n$), or by specifying the -o keyletter followed by a list of options enclosed in double quotes (that is, -o "$option sub 1$ $option sub 2$ ... $option sub n$"). The following options have a immediate effect; other options are passed as a Z line entry in the control file, i.e. - as an lpr(1) -Z option.

    nobanner
        Do not print a banner page with this request. This is the same as the lpr(1) -h (no header) option.

    width=number
        Print this request with page-width set to number. This is the same as the lpr(1) -w width option.

-P page-list
    Print the pages specified in page-list. This option is ignored.

-p  Enable notification on completion of the print request. This option is ignored.

-q priority-level
    Assign this request priority-level in the printing queue. The values of priority-level range from 0, the highest priority, to 25, the lowest priority. If a priority is not specified, the default for the print service is used, as assigned by the system administrator. A priority limit may be assigned to individual users by the system administrator. The numerical values are translated to corresponding letter priority values.

-s  Suppress messages from lp such as those that begin with "request id is..."
-S character-set
-S print-wheel
    Print this request using the specified character-set or print-wheel. The options are passed as an lpr(1) -Z option.

-t title
    Print title on the banner page of the output. If title is not supplied the name of the file is printed on the banner page. Enclose title in quotes if it contains blanks.

-T content-type [-r]
    Print the request on a printer that can support the specified content-type. The content-type is passed as an lpr(1) -Z option.

-w  Write a message on the user's terminal after the files have been printed. This option is ignored.

-y mode-list
    Print this request according to the printing modes listed in mode-list. The mode-list-type is passed as an lpr(1) -Z option.

-D debug-optios
    A list of debug options for the program. These can be a number (debug level) or keyword and level (flag), such as 9, network, network+2, etc.

OPERANDS
The following operands are supported by lp:

file
    A path name of a file to be output. If no file operands are specified, or if a file operand is -, the standard input will be used. The - option must be last in the list.

ENVIRONMENT
See environ(5) for descriptions of the following environment variables that affect the execution of lp and cancel:

LPDEST
    Determine the output device or destination. If the LPDEST environment variable is not set, the PRINTER environment variable will be used. The -d dest option takes precedence over LPDEST. Results are undefined when -d is not specified and LPDEST contains a value that is not a valid device or destination name.

PRINTER
    Determine the output device or destination. If the LPDEST and PRINTER environment variables are not set, an unspecified output device is used. The -d dest option and the LPDEST environment variable takes precedence over PRINTER. Results are undefined when -d is not specified, LPDEST is unset, and PRINTER contains a value that is not a valid device or destination name.

EXIT STATUS
The following exit values are returned by lp:

0   All input files were processed successfully.

>0  No output device was available, or an error occurred.

SEE ALSO
lpd.conf(5), lpc(8), lpd(8), lpr(1), lpq(1), lprm(1), 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 functionality similar to the Berkeley LPR software. In 1988 Patrick Powell released the PLP (Public Line Printer) software, which went through several evolutions. Justin Mason (jmason@iona.ie) generated PLP4.0 from several older releases of PLP. In 1992 Patrick Powell release LPRng, a completely redesigned and newly written version of the software.

The LPRng mailing list is plp@iona.ie; subscribe by sending mail to plp-request@iona.ie with the word subscribe in the body. The software is available from ftp://iona.ie/pub/LPRng.

LPRng is distributed under the GNU software license for non-commercial use, the Artistic License for limited commercial use. Commerical support and licensing is available through Patrick Powell <papowell@sdsu.edu>.