1.ds VE LPRng-3.9.0
2.TH LPR 1 \*(VE "LPRng"
3.ig
4Thu Jul 20 07:19:29 PDT 1995 Patrick Powell
5..
6.SH NAME
7lpr \- off line print
8.SH SYNOPSIS
9.B lpr
10[
11.B \-A
12]
13[
14.B \-B
15]
16[
17.B \-b,l
18]
19[
20.BI \-C " class"
21]
22[
23.BI \-D " debugopt"
24]
25.ti +5n
26[
27.BI \-F " filterformat"
28]
29[
30.B \-G
31]
32[
33.B \-h
34]
35[
36.BI \-i " indentcols"
37]
38.ti +5n
39[
40.B \-k
41]
42[
43.BI \-J " job"
44]
45[
46.BI \-K,# " copies"
47]
48.ti +5n
49[
50.BI \-m " mailTo"
51]
52[
53.BI \-P " printer"
54]
55[
56.B \-r
57]
58.ti +5n
59[
60.BI \-R " remoteAccount"
61]
62[
63.B \-s
64]
65[
66.BI \-T " title"
67]
68[
69.BI \-U " user"
70]
71.ti +5n
72[
73.B \-V
74]
75[
76.BI \-w " width"
77]
78[
79.BI \-X " userfile"
80]
81[
82.B \-Y
83]
84[
85.BI \-Z " options"
86]
87[
88.BI \-1,2,3,4 " font"
89]
90[
91.B \-\-
92]
93.ti +5n
94[
95.IR filename " \|.\|.\|."
96]
97.SH DESCRIPTION
98.B Lpr
99uses a spooling daemon to print the named files when facilities
100become available.  If no names appear, the standard input is assumed.
101.SH OPTIONS
102.TP 5
103.B \-A
104The authentication type is set by the value of the AUTH environment variable.
105.TP 5
106.B \-B
107Do filtering of job files by the filters specified by the printcap.
108Combine the output of the filtering operation into a single job file and then
109send the single file to the lpd print spooler.
110.TP 5
111.B "\-b, \-l"
112either of these flags specifies a
113binary or literal file,
114and no (or minimial) processing is to be done by the print spooling system.
115Printed using the
116.I f
117format filter (:if=... or :filter=...).
118.TP 5
119.BI \-C " class"
120Specify the job classification for use on the burst page and to
121set the priority.
122Priorities range from A (lowest) to Z (highest);
123the default priority is A.
124For example,
125.br
126.ti +0.5i
127lpr \-C B foo.c
128.br
129sets the priority/class to B and the file foo.c is printed.
130.TP 5
131\fB\-D\fP\ \fIdebugoptions\fP
132Debugging is controlled using the
133.B \-D
134option. This accepts a comma-separated list of debugging
135settings. These settings take one of two forms: 
136.BI facility =value, 
137or
138.B value 
139to set an overall default value.
140.TP 5
141\fB\-F\fI filterformat\fR
142Filter or format specification.
143By default,
144input is assumed to a standard text file and the
145.I f
146format is used;
147the output device is assmed to be a simple line printer.
148Other formats available are listed below.
149Not all formats may be available on all printers;
150see
151.BR printcap (5)
152for details.
153Formats are single lower case letters;
154the following are the valid arguments for
155.B \-F
156together with the assumed type of data.
157For compatibility with previous versions of
158.BR lpr ,
159the format types can be used as options themselves
160(i.e. by omitting the
161.BR F )
162except where noted below,
163a warning may be issued in such cases.
164.\".RS 5
165.TP 5
166\fB\-G\fP
167Similar to the
168\fB\-B\fP option,
169but only processes individual files.
170.TP 5
171\fB\-h\fP
172No banner or header for this job.
173.TP 5
174.BI \-i " indentcols"
175Indent input by indentcols.
176Note that this option is not supported on all printers.
177.TP 5
178.BI -J " jobname"
179Specify the job name to print on the burst page;
180defaults to the name of files in the job or
181.I "(STDIN)"
182if input is from a pipe.
183.TP 5
184\fB\-K\fP\fIcopies\fP,\0\fB\-#\fP\fIcopies\fP
185Specify the number of copies of each file to be printed.
186You may or may not get the requested number of copies depending on the
187intelligence of the remote printing system.
188.TP 5
189.B \-k
190.B lpr
191normally creates a temporary file
192for the input read from stdin before sending it to the remote
193printer.
194The
195.B \-k
196(kut-through) option
197will simply copy from STDIN to the destination print spooling system.
198If you kill the job in the middle of creation
199then the partly transferred file will get printed.
200This option may not work with very large jobs,
201non-LPRng spoolers,
202or
203when you have encryption or authentication enabled.
204.TP 5
205.BI \-m " mailTo"
206Send mail upon unsuccessful completion to user
207.IR mailTo .
208The mailTo value has been used to do such things as
209specify email (user@host), paging (page:user@host),
210both (user@host,page:user@host)
211and all sorts of other notifier information.
212See the LPRng HOWTO for details on how this is implemented.
213.TP 5
214.BI \-P " printer"
215By default,
216the destination printer
217is taken from
218the command line
219.I "-P printer"
220value,
221then
222the environment variables
223PRINTER,
224LPDEST,
225NPRINTER,
226NGPRINTER,
227then first entry in the printcap information,
228and and finally the default_printer entry from the
229configuration file,
230and then the compile time default.
231.TP 5
232.BI \-R " remoteAccount"
233Specify accounting information to be used by a remote system that prints
234your output.
235.sp
236This parameter
237can be used to specify a billing code to be charged for the
238printing.
239.TP 5
240.B \-r
241The DREADED
242.B "REMOVE AFTER PRINTING"
243option.
244Beware, for 
245.I lpr
246will delete the files after spooling them.
247Present by demand from users for compatibility with other Berkeley lpr
248implementation,
249but really should NOT be present.
250.TP 5
251.BI \-T "  title"
252Specify the title used by
253.BR pr (1);
254defaults to the file name.
255.TP 5
256\fB\-U\fP\ \fIusername\fP
257The
258.B \-U
259option is used to specify a user name
260for the job.
261This is available only to ROOT or users listed in the
262.I allow_user_setting
263configuration option.
264This is obviously a security loophole,
265but it is present to allow systems such as SAMBA
266to submit jobs on behalf of users.
267See
268.B "Authenticated Transfers"
269below.
270.TP 5
271.B \-V
272Verbose mode. Additional -V flags increase verbosity.
273Use debug flags for extreme verbosity.
274.TP 5
275.BI \-w " width"
276Specify the page width for printing the job.
277.BI \-X " path"
278User specified filter for job files.  Processing is done on
279the client host.
280.B \-Y
281Make a direct connection to the printer device and do not spool.
282.TP 5
283.BI -Z " options"
284Pass the specified options to the print spooler.
285Used when additional or specialized information
286must be provided to the spooler.
287.TP 5
288.B "OBSOLETE OPTIONS Lower case \-c, \-d, \-g, \-n, \-t, \-v"
289Used to indicate:
290.B \-c
291is data produced by
292.BR cifplot (l),
293.B \-d 
294is
295.BR tex (l)
296(DVI format from Stanford),
297.B \-g
298is
299standard plot data as produced by the
300.BR plot (3X)
301routines,
302.B \-n
303and
304.B \-t
305is output from (device independent)
306.BR troff ,
307.B \-v
308a raster image for devices like the Benson Varian.
309.B "These are obsolete."
310These are retained for historical compatibility,
311but most of their functionality has been replaced by the
312abilities of the printer support system to determine the
313file type and do the appropriate conversions.
314.\".RE
315.TP 5
316.B "OBSOLETE OPTION \-p"
317.B "This is obsolete."
318This option is retained for historical compatibility,
319but this functionality should be implemented on the
320client system before sending the job to the printer.
321Use
322.BR pr (1)
323to format the files,
324then print using 
325.I f
326format.
327This may not be supported on the print system.
328.TP 5
329.B "OBSOLETE \-s"
330This flag is included for compatibility with other versions of
331.BR lpr .
332In these versions it will create a symbolic link to the files to be
333printed.  
334.B Lpr
335now sends files directly to the server and it is irrelevant.
336.TP 5
337.BI "OBSOLETE OPTIONS \-1,2,3,4" "fontname"
338Specify a font to be mounted on font position \fIi\fR
339for TROFF printing (Obsolete).
340.SH FILENAMES
341.PP
342By default,
343if no filenames are specified
344.B lpr
345will read stdin and print it.
346.SH "AUTHENTICATED TRANSFERS"
347.PP
348The original LPR network protocol defined in RFC1179 did not
349provide for user to server authentication.
350This is now supported by LPRng.
351See the LPRng support documentation for details on its operation
352and support.
353.SH COMPATIBILITY 
354.PP
355The LPRng version of
356.B lpr
357attempts to be functionaly compatible with common implementations of
358.BR lpr .
359However,
360there are some commands and functionality that are deliberately missing.
361.IP "\fB\-s\fP\ Symbolic Links" 5
362(Berkeley LPR) This option specified that a symbolic link
363to the original data file
364rather than a copy of the data file was to be used when spooling jobs.
365This opens up a variety of security problems,
366as well as being ineffective when printing to a remote host.
367.SH "THE -B, -Y, -X filter ULTRA-LIGHTWEIGHT PRINTING OPTIONS"
368.PP
369LPRng supports ultra-lightweight printing by eliminating the need
370for a print spooler.
371This is quite dangerous, but makes the lpr client very lightweight.
372The
373.B \-Y
374command line option and the
375.B :direct
376printcap option enables lpr to connect directly to a specified port
377or use a program to send a job.
378This filter also enables client side filtering,  so if there are
379any filters specified in the printcap entry they will be used.
380For example:
381.nf
382lpr -Y -Phost%port file1 file2 ...
383 approximately equivalent to:
384   for i in file1 file2 ...; do
385     ${filter} <$i;
386  # ${filter} is filter from printcap
387   done  >host%port (TCP/IP connection)
388
389lpr -Y -Phost%port -X userfilter file1 file2 ...
390 approximately equivalent to:
391   for i in file1 file2 ...; do
392     userfilter <$i;
393   done  >host%port (TCP/IP connection)
394
395Summary:
396   -P host%port    > TCP/IP connection to host%port
397   -P /dev/lp      > /dev/lp
398   -P '|/program'  | /program
399
400SPECIAL CASE
401lpr -Y -Ppr@host -X userfilter file1 file2 ...
402 approximately equivalent to:
403   for i in file1 file2 ...; do
404     userfilter <$i >temp.$i;
405   done
406   lpr -Ppr@host temp.file1 temp.file2
407.fi
408.PP
409The
410.B \-B
411option or the :lpr_bounce is used to filter and make a single file out
412of a set of print files and then forward them.
413.RS
414.nf
415lpr -B -Ppr@host
416  approximately equivalent to:
417   lpr -Y -P/tmp/tempfile file1 file2 ...
418   lpr -Ppr@host /tmp/tempfile
419.fi
420.RE
421.PP
422You can also use a printcap entry and the
423.B :direct
424options.
425.RS
426.nf
427Printcap:
428   lp:direct:lp=h14%9100:remote_support=R
429lpr -Plp file1 file2
430   Same as:
431lpr -Plp -Y -Ph14%9100 file1 file2
432.fi
433.RE
434.PP
435The
436.B :remote_support
437option is used to prevent the
438.B lpq
439and
440.B lpc
441program from attempting to send jobs to the device.
442
443.SH ENVIRONMENT
444.PP
445By default,
446the destination printer
447is taken from
448the command line
449.I "-P printer"
450value,
451then
452the environment variables
453PRINTER,
454LPDEST,
455NPRINTER,
456NGPRINTER,
457then first entry in the printcap information,
458and and finally the default_printer entry from the
459configuration file,
460and then the compile time default.
461.SH "EXIT STATUS"
462.PP
463The following exit values are returned:
464.TP 15
465.B "zero (0)"
466Successful completion.
467.TP
468.B "non-zero (!=0)"
469An error occurred.
470.SH "PRINTCAP INFORMATION"
471.LP
472The printer names and other information is obtained by using a printcap
473file or some other database.
474The ${HOME}/.printcap
475file can be used to specify user level options and configuration
476information.
477See
478printcap(5)
479for more information. 
480.SH FILES
481.PP
482The files used by LPRng are set by values in the
483printer configuration file.
484The following are a commonly used set of default values.
485.nf
486.ta \w'/var/spool/lpd/printcap.<hostname>           'u
487_LPD_CONF_PATH_	LPRng configuration file
488${HOME}/.printcap	user printer description file
489_PRINTCAP_PATH_	printer description file
490_LPD_PERMS_PATH_	permissions
491_LOCKFILE_	lock file for queue control
492/var/spool/lpd		spool directories
493/var/spool/lpd/QUEUE/control	queue control
494/var/spool/lpd/QUEUE/log	trace or debug log file
495/var/spool/lpd/QUEUE/acct	accounting file
496/var/spool/lpd/QUEUE/status	status file
497.fi
498.SH "SEE ALSO"
499.BR lpd.conf (5),
500.BR lpc (8),
501.BR lpd (8),
502.BR checkpc (8),
503.BR lpq (1),
504.BR lprm (1),
505.BR checkpc (8),
506.BR printcap (5),
507.BR lpd.perms (5),
508.BR pr (1).
509.SH DIAGNOSTICS
510.nf
511Most of the diagnostics are self explanatory.
512If you are puzzled over the exact cause of failure,
513set the debugging level on (-D5) and run again.
514The debugging information will 
515help you to pinpoint the exact cause of failure.
516.fi
517.SH "HISTORY"
518LPRng is a enhanced printer spooler system
519with functionality similar to the Berkeley LPR software.
520The LPRng mailing list is lprng@lprng.com;
521subscribe by sending mail to lprng-request@lprng.com with
522the word subscribe in the body.
523The software is available from ftp://ftp.lprng.com/pub/LPRng.
524.SH "AUTHOR"
525Patrick Powell <papowell@lprng.com>.
526