1.ds VE LPRng-3.9.0
2'\" e
3.\" @(#)lp.1 1.36 95/10/09 SMI; from SVr4
4.\" Copyright 1989 AT&T
5.\" Copyright (c) 1995, Sun Microsystems, Inc.
6.\" All Rights Reserved
7.\" Portions Copyright (c) 1992, X/Open Company Limited
8.\" Portions Copyright (c) 1996, Patrick Powell
9.\" All Rights Reserved
10.ig
11.EQ
12gsize 10
13delim $$
14.EN
15..
16.TH LP 1 \*(VE "LPRng"
17.SH NAME
18lp \- send requests to an LPRng print service
19.SH SYNOPSIS
20.B lp
21[
22.B \-A
23] [
24.B \-B
25] [
26.B \-c
27] [
28.B \-G
29] [
30.B \-m
31] [
32.B \-p
33] [
34.B \-s
35] [
36.B \-w
37] [
38.BI \-d " dest"
39]
40.if n .ti +5n
41[
42.BI \-f " form-name"
43[
44.B \-d any
45] ]
46.if t .ti +5n
47[
48.BI \-H " special-handling"
49]
50.if n .ti +5n
51[
52.BI \-n " number"
53] [
54.BI \-o " option"
55] [
56.BI \-P " page-list"
57]
58.if n .ti +5n
59[
60.BI \-q " priority-level"
61]
62.if t .ti +5n
63[
64.BI \-S " character-set"
65[
66.B \-d any
67] ]
68.if n .ti +5n
69[
70.BI \-S " print-wheel"
71] [
72.BI \-t " title"
73]
74.if t .ti +5n
75.if n .ti +5n
76[
77.BI \-T " content-type"
78[
79.B \-r
80] ] [
81.BI \-y " mode-list"
82]
83.if n .ti +5n
84[
85.BI \-X " path"
86]
87[
88.BI \-D " debug-options"
89]
90.if n .ti +5n
91[
92.IR file \|.\|.\|.
93]
94.SH DESCRIPTION
95.IX "lp command" "" "\fLlp\fP \(em send requests to an LP print service"
96.IX "LPRng print services" "print files" "" "print files \(em \fLlp\fP"
97.IX "printers" "send requests" "" "send requests \(em \fLlp\fP"
98.LP
99The LPRng
100\f3lpr\fP
101client supports an \f3lp\fP interface when invoked with the
102\f3lp\fP
103program name.
104This is usually done by making a symbolic link to the
105\f3lpr\fP program with the name
106\f3lp\fP.
107This is similar to the
108.BR ex (1)
109and
110.BR vi (1)
111programs.
112The supported form of the \f3lp\fP command
113arranges for the named \f2file(s)\fP and associated information
114(collectively called a
115.IR request )
116to be printed.
117If no file names are specified on the command line,
118the standard input is assumed.
119The standard input may be specified
120along with a named \f2file\f1(s)
121on the command line by listing the file name(s)
122and specifying \`\f3\-\f1\' (dash)
123for the standard input.
124The \f2files\f1 will be printed
125in the order in which they appear on the shell command line.
126.LP
127The
128.SM LP
129print service
130associates a unique \f2request-ID\f1
131with each request
132and displays it on the standard output.
133The job number portion or full request-ID can be used later with
134.BR cancel (1)
135or
136.BR lprm (1)
137when canceling a job or when determining its status.
138See 
139.BR cancel (1)
140and
141.BR lprm (1)
142for details about canceling a request,
143and
144.BR lpstat (1)
145and
146.BR lpq (1)
147for information about checking the status of a print request.
148.SH OPTIONS
149.LP
150Options to
151.B lp
152always precede any file names,
153but may be specified in any order.
154The following options are available for
155.BR lp :
156.TP 15
157.B \-A
158Use authenticated transfer.
159Note that this is not a standard
160.BR lp (1)
161option but has been added for compatibilty with LPRng.
162The authentication type is set by the value of the AUTH environment variable.
163.B \-B
164Process jobs using filters specified in the printcap information.
165The filter output is combined into a single file and sent to the print spooler.
166.TP 15
167.B \-c
168Make a copy
169of the
170.I file
171before printing.
172(This has no effect as LPRng always sends
173jobs immediately to the remote server for printing.)
174.TP
175.BI \-d " dest"
176The print queue or printer to be used.
177By default,
178the destination printer
179is taken from
180the command line
181.I dest
182value,
183then
184the environment variables
185PRINTER,
186LPDEST,
187NPRINTER,
188NGPRINTER,
189then first entry in the printcap information,
190and and finally the default_printer entry from the
191configuration file,
192and then the compile time default.
193.TP
194\f3\-f \f2form-name\f1
195Print the request on the form
196.IR form-name .
197This sets the job class to
198.I form-name
199and is similar to the lpr -C option.
200.B \-G
201Process jobs using filters specified in the printcap information.
202The filter output for individual files is sent to the print spooler.
203.TP 15
204.BI \-H " special-handling"
205These options are ignored.
206.TP 15
207.B \-m
208Send mail (see
209.BR mail (1))
210after the files have been printed.
211The mail address is taken from the USER enviroment
212variable.
213By default, no mail is sent
214upon normal completion of the print request.
215.TP
216.BI \-n " number"
217Print
218.I number
219copies (default is
220.BR 1 )
221of the output.
222.br
223.ne 5
224.TP
225.BI \-o " option"
226Specify printer-dependent
227.IR options .
228Several such
229.I options
230may be collected by specifying
231the
232.B \-o
233keyletter more than once
234(\f3\-o $option sub 1$\f3
235\-o $option sub 2$\f2 ... \f3\-o $option sub n$\f1),
236or by specifying
237the \f3\-o\f1 keyletter followed by
238a list of options
239enclosed in double quotes
240(that is, \f3\-o "$option sub 1$\f3
241$option sub 2$\f3 \f2... $option sub n$\f3"\f1).
242The following options have a immediate effect;
243other options are passed as a
244.B Z
245line entry in the control file,
246i.e. - as an 
247.BI lpr (1)
248.B \-Z
249option.
250.RS 15
251.TP 10
252.B nobanner
253Do not print a banner page with this request.
254This is the same as the
255.BI lpr (1)
256.B -h
257(no header) option.
258.TP  10
259\f3width\f2=number\f1
260Print this request with page-width set to
261\f2number\f1.
262This is the same as the
263.BI lpr (1)
264.BI -w " width"
265option.
266.RE
267.TP 15
268.BI \-P " page-list"
269Print the pages specified in \f2page-list\f1.
270This option is ignored.
271.TP
272.B \-p
273Enable notification on completion of the print request.
274This option is ignored.
275.TP
276.BI \-q " priority-level"
277Assign this request \f2priority-level\f1 in the printing queue.
278The values of \f2priority-level\f1 range from
279.BR 0 ,
280the highest priority, to
281.BR 25 ,
282the lowest priority.  If a priority is not specified, the default
283for the print service is used, as assigned by the system administrator.
284A priority limit may be assigned to individual users by the
285system administrator.
286The numerical values are translated to corresponding letter
287priority values.
288.TP 15
289.B \-s
290Suppress messages from \f3lp\f1
291such as those that begin with "\f3request id is\f1\|.\|.\|."
292.PD 0
293.TP 15
294\f3\-S \f2character-set \f1
295.TP 15
296\f3\-S \f2print-wheel\f1
297.PD
298Print this request using the specified \f2character-set\f1
299or \f2print-wheel\f1.
300The options are passed as an
301.BI lpr (1)
302.B \-Z
303option.
304.br
305.ne 7
306.TP
307\f3\-t \f2title\f1
308Print
309.I title
310on the banner page of the output.
311If
312.I title
313is not supplied the name of the file is printed on the banner
314page.
315Enclose \f2title\fP in quotes if it contains blanks.
316.TP
317\f3\-T \f2content-type\f1 [\f3\-r\f1]
318Print the request on a printer that can support
319the specified \f2content-type\f1.
320The
321\f2content-type\f1
322is passed as an
323.BI lpr (1)
324.B \-Z
325option.
326.TP
327\f3\-w\f1
328Write a message on the user's terminal after the
329.I files
330have been printed.
331This option is ignored.
332.TP
333.BI \-X " path"
334Filter individual job files using the specified program and send
335the filter output to the print spooler.
336.TP
337\f3\-y \f2mode-list\f1
338Print this request
339according to the printing modes listed in \f2mode-list\f1.
340The
341\f2mode-list-type\f1
342is passed as an
343.BI lpr (1)
344.B \-Z
345option.
346.TP
347\f3\-D \f2debug-optios\f1
348A list of debug options for the program.
349These can be a number (debug level) or keyword and level (flag),
350such as 9, network, network+2, etc.
351.ne 15
352.SH OPERANDS
353The following operands are supported by
354.BR lp :
355.TP 15
356.I file
357A path name of a file to be output.
358If no
359.I file
360operands are specified,
361or if a
362.I file
363operand is
364.BR \- ,
365the standard input will be used.
366The
367.BR \-
368option must be last in the list.
369.SH "PRINTCAP INFORMATION"
370.LP
371The printer names and other information is obtained by using a printcap
372file or some other database.
373The ${HOME}/.printcap
374file can be used to specify user level options and configuration
375information.
376See
377printcap(5)
378for more information. 
379.SH ENVIRONMENT
380.PP
381By default,
382the destination printer
383is taken from
384the command line
385.I dest
386value,
387then
388the environment variables
389PRINTER,
390LPDEST,
391NPRINTER,
392NGPRINTER,
393then first entry in the printcap information,
394and and finally the default_printer entry from the
395configuration file,
396and then the compile time default.
397.SH "EXIT STATUS"
398.PP
399The following exit values are returned:
400.TP 15
401.B "zero (0)"
402Successful completion
403.TP
404.B "nonzero (!= 0)"
405An error occurred.
406.SH FILES
407.PP
408The files used by LPRng are set by values in the
409LPRng configuration file.  The default values are:
410.nf
411.ta \w'/var/spool/lpd/printcap.<hostname>           'u
412_LPD_CONF_PATH_	LPRng configuration file
413${HOME}/.printcap	user printer description file
414_PRINTCAP_PATH_	printer description file
415_LPD_PERMS_PATH_	permissions
416_LOCKFILE_	lock file for queue control
417/var/spool/lpd		spool directories
418/var/spool/lpd/QUEUE/control	queue control
419/var/spool/lpd/QUEUE/log	trace or debug log file
420/var/spool/lpd/QUEUE/acct	accounting file
421/var/spool/lpd/QUEUE/status	status file
422.fi
423.SH SEE ALSO
424lpd.conf(5),
425lpc(8),
426lpd(8),
427lpr(1),
428lpq(1),
429lprm(1),
430printcap(5),
431lpd.perms(5),
432pr(1), lprng_certs(1), lprng_index_certs(1).
433.SH DIAGNOSTICS
434.nf
435Most of the diagnostics are self explanatory.
436If you are puzzled over the exact cause of failure,
437set the debugging level on (-D5) and run again.
438The debugging information will 
439help you to pinpoint the exact cause of failure.
440.fi
441.SH "HISTORY"
442LPRng is a enhanced printer spooler system
443with functionality similar to the Berkeley LPR software.
444The LPRng mailing list is lprng@lprng.com;
445subscribe by sending mail to lprng-request@lprng.com with
446the word subscribe in the body.
447The software is available from ftp://ftp.lprng.com/pub/LPRng.
448.SH "AUTHOR"
449Patrick Powell <papowell@lprng.com>.
450