summaryrefslogtreecommitdiff
path: root/usr/src/man/man1b/lpr.1b
blob: 8645d78562c66f68b7ba9fdcb795475fe458d7b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
'\" te
.\" Copyright (c) 1980 Regents of the University of California. All rights reserved. The Berkeley software License Agreement specifies the terms and conditions for redistribution.
.\" Copyright (C) 2006, Sun Microsystems, Inc. All Rights Reserved
.TH LPR 1B "Feb 25, 2017"
.SH NAME
lpr \- submit print requests
.SH SYNOPSIS
.LP
.nf
\fB/usr/ucb/lpr\fR [\fB-P\fR \fIdestination\fR] [\fB-#\fR \fInumber\fR] [\fB-C\fR \fIclass\fR]
     [\fB-J\fR \fIjob\fR] [\fB-T\fR \fItitle\fR] [\fB-i\fR [\fIindent\fR]]
     [\fB-1\fR | \fB-2\fR | \fB-3\fR | \fB-4\fR \fIfont\fR] [\fB-w\fR \fIcols\fR] [\fB-m\fR] [\fB-h\fR] [\fB-s\fR]
     [\fB-filter_option\fR] [\fIfile\fR]...
.fi

.SH DESCRIPTION
.LP
The \fBlpr\fR utility submits print requests to a destination. \fBlpr\fR prints
files (\fIfile\fR) and associated information, collectively called a \fIprint
request\fR. If \fIfile\fR is not specified, \fBlpr\fR assumes the standard
input.
.sp
.LP
The print client commands locate destination information using the "printers"
database in the name service switch. See \fBnsswitch.conf\fR(5),
\fBprinters\fR(5), and \fBprinters.conf\fR(5) for details.
.sp
.LP
Print requests with more than 52 \fIfile\fRs specified is truncated to 52 files
when the BSD print protocol is used for job submission.
.SH OPTIONS
.LP
The following options are supported:
.sp
.ne 2
.na
\fB\fB-C\fR \fIclass\fR\fR
.ad
.sp .6
.RS 4n
Prints \fIclass\fR as the job classification on the banner page of the output.
Enclose \fIclass\fR in double quotes if it contains blanks. If \fIclass\fR is
not specified, the name of the system (as returned by \fBhostname\fR) is
printed as the job classification. See \fBhostname\fR(1).
.RE

.sp
.ne 2
.na
\fB\fB-h\fR\fR
.ad
.sp .6
.RS 4n
Suppresses printing of the banner page of the output.
.RE

.sp
.ne 2
.na
\fB\fB-i\fR \fIindent\fR\fR
.ad
.sp .6
.RS 4n
Indents the output a specific number of \fISPACE\fR characters. Use
\fIindent\fR to indicate the number of \fISPACE\fR characters to be indented.
Specify \fIindent\fR as a positive integer. If the optional argument to indent
is not specified, then eight \fISPACE\fR characters is the default. The
\fB-i\fR option is ignored unless it is specified with the \fB-p\fR filter
option.
.RE

.sp
.ne 2
.na
\fB\fB-J\fR \fIjob\fR\fR
.ad
.sp .6
.RS 4n
Prints \fIjob\fR as the \fIjob name\fR on the banner page of the output.
Enclose \fIjob\fR in double quotes if it contains blanks. If \fIjob\fR is not
specified, \fIfile\fR (or in the case of multiple files, the first \fIfile\fR
specified on the command line) is printed as the job name on the banner page of
the output.
.RE

.sp
.ne 2
.na
\fB\fB-m\fR\fR
.ad
.sp .6
.RS 4n
Sends mail after \fIfile\fR has printed. See \fBmail\fR(1). By default, no mail
is sent upon normal completion of a print request.
.RE

.sp
.ne 2
.na
\fB\fB-P\fR \fIdestination\fR\fR
.ad
.sp .6
.RS 4n
Prints \fIfile\fR on a specific printer or class of printers (see
\fBlpadmin\fR(8)). Specify \fIdestination\fR using atomic, URI-style
(\fIscheme\fR\fB://\fR\fBendpoint\fR), or POSIX-style
(\fIserver\fR\fB:\fR\fIdestination\fR) names. See \fBprinters.conf\fR(5) for
information regarding destination names.
.RE

.sp
.ne 2
.na
\fB\fB-s\fR\fR
.ad
.sp .6
.RS 4n
Prints files by reference rather than copying them. This means that files
should not be modified or removed until they have completed printing. This
option only prevents copying of files when the print queue is on the local
machine and the files are specified on the command line.
.RE

.sp
.ne 2
.na
\fB\fB-T\fR \fItitle\fR\fR
.ad
.sp .6
.RS 4n
Prints a title on the page header of the output. Enclose \fItitle\fR in double
quotes if it contains blanks. The \fB-T\fR option is ignored unless it is
specified with the \fB-p\fR filter option.
.RE

.sp
.ne 2
.na
\fB\fB-w\fR \fIcols\fR\fR
.ad
.sp .6
.RS 4n
Prints \fIfile\fR with pages of a specific width. \fIcols\fR indicates the
number of columns wide. The \fB-w\fR option is ignored unless it is specified
with the \fB-p\fR filter option.
.RE

.sp
.ne 2
.na
\fB\(mi\fB1\fR|\(mi\fB2\fR|\(mi\fB3\fR|\(mi\fB4\fR \fIfont\fR\fR
.ad
.sp .6
.RS 4n
Mounts the specified font in the font position \fB1\fR, \fB2\fR, \fB3\fR, or
\fB4\fR. Specify \fIfont\fR as a valid font name.
.RE

.sp
.ne 2
.na
\fB\fB\(mi\fR \fIfilter_option\fR\fR
.ad
.sp .6
.RS 4n
Notifies the print spooler that \fIfile\fR is not a standard text file. Enables
the spooling daemon to use the appropriate filters to print \fIfile\fR.
.sp
\fIfilter_option\fRs offer a standard user interface. All filter options might
not be available for, or applicable to, all printers.
.sp
Specify \fIfilter_option\fR as a single character.
.sp
If \fIfilter_option\fR is not specified and the printer can interpret
PostScript\(rg, inserting `\fB%!\fR' as the first two characters of \fIfile\fR
causes \fIfile\fR to be interpreted as PostScript.
.sp
The following filter options are supported:
.sp
.ne 2
.na
\fBc\fR
.ad
.RS 5n
\fIfile\fR contains data produced by \fIcifplot\fR.
.RE

.sp
.ne 2
.na
\fBd\fR
.ad
.RS 5n
\fIfile\fR contains \fBtex\fR data in \fBDVI\fR format from Stanford.
.RE

.sp
.ne 2
.na
\fBf\fR
.ad
.RS 5n
Interprets the first character of each line as a standard FORTRAN carriage
control character.
.RE

.sp
.ne 2
.na
\fBg\fR
.ad
.RS 5n
\fIfile\fR contains standard plot data produced by \fBplot\fR(1B) routines.
.RE

.sp
.ne 2
.na
\fBl\fR
.ad
.RS 5n
Print control characters and suppress page breaks.
.RE

.sp
.ne 2
.na
\fBn\fR
.ad
.RS 5n
\fIfile\fR contains \fBditroff\fR data from device independent troff.
.RE

.sp
.ne 2
.na
\fBp\fR
.ad
.RS 5n
Use \fBpr\fR to format the files. See \fBpr\fR(1).
.RE

.sp
.ne 2
.na
\fBt\fR
.ad
.RS 5n
\fIfile\fR contains \fBtroff\fR (cat phototypesetter) binary data.
.RE

.sp
.ne 2
.na
\fBv\fR
.ad
.RS 5n
\fIfile\fR contains a raster image. \fIprinter\fR must support an appropriate
imaging model such as PostScript in order to print the image.
.RE

.RE

.sp
.ne 2
.na
\fB\fB-#\fR \fInumber\fR\fR
.ad
.sp .6
.RS 4n
Prints a specific number of copies. Specify \fInumber\fR as a positive integer.
The default for \fInumber\fR is \fB1\fR.
.RE

.SH OPERANDS
.LP
The following operand is supported:
.sp
.ne 2
.na
\fB\fIfile\fR\fR
.ad
.RS 8n
The name of the file to be printed. Specify \fIfile\fR as a pathname. If
\fIfile\fR is not specified, \fBlpr\fR uses the standard input.
.RE

.SH USAGE
.LP
See \fBlargefile\fR(7) for the description of the behavior of \fBlpr\fR when
encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
.SH EXIT STATUS
.LP
The following exit values are returned:
.sp
.ne 2
.na
\fB\fB0\fR\fR
.ad
.RS 12n
Successful completion.
.RE

.sp
.ne 2
.na
\fBnon-zero\fR
.ad
.RS 12n
An error occurred.
.RE

.SH FILES
.ne 2
.na
\fB\fB/etc/printers.conf\fR\fR
.ad
.RS 24n
System printer configuration database
.RE

.sp
.ne 2
.na
\fB\fB$HOME/.printers\fR\fR
.ad
.RS 24n
User-configurable printer database
.RE

.sp
.ne 2
.na
\fB\fBou=printers\fR\fR
.ad
.RS 24n
LDAP version of \fB/etc/printers.conf\fR
.RE

.sp
.ne 2
.na
\fB\fBprinters.conf.byname\fR\fR
.ad
.RS 24n
NIS version of \fB/etc/printers.conf\fR
.RE

.SH ATTRIBUTES
.LP
See \fBattributes\fR(7) for descriptions of the following attributes:
.sp

.sp
.TS
box;
c | c
l | l .
ATTRIBUTE TYPE	ATTRIBUTE VALUE
_
Interface Stability	Standard
_
CSI	Enabled. See NOTES
.TE

.SH SEE ALSO
.LP
.BR hostname (1),
.BR lp (1),
.BR lpstat (1),
.BR mail (1),
.BR pr (1),
.BR troff (1),
.BR lpc (1B),
.BR lpq (1B),
.BR lprm (1B),
.BR plot (1B),
.BR nsswitch.conf (5),
.BR printers (5),
.BR printers.conf (5),
.BR attributes (7),
.BR largefile (7),
.BR standards (7),
.BR lpadmin (8)
.SH DIAGNOSTICS
.ne 2
.na
\fB\fBlpr:\fR \fIdestination\fR \fB|: unknown destination\fR\fR
.ad
.sp .6
.RS 4n
\fIdestination\fR was not found in the \fBLP\fR configuration database. Usually
this is a typing mistake; however, it can indicate that the \fIdestination\fR
does not exist on the system. Use \fBlpstat\fR \fB-p\fR to display information
about the status of the print service.
.RE

.SH NOTES
.LP
\fBlpr\fR is CSI-enabled except for the \fIprinter\fR name.
.sp
.LP
Print jobs are assumed to contain one type of data. That type of data is either
specified on the command line or autodetected (simple, PostScript) based on the
contents of the first file in the job.
.sp
.LP
When IPP is in use, the user is prompted for a passphrase if the remote print
service is configured to require authentication.