]> git.ipfire.org Git - thirdparty/cups.git/blob - man/lpr.man
cae4ac0419d7746d223106cd6bb98c9e31020e33
[thirdparty/cups.git] / man / lpr.man
1 .\"
2 .\" lpr man page for CUPS.
3 .\"
4 .\" Copyright © 2007-2018 by Apple Inc.
5 .\" Copyright © 1997-2006 by Easy Software Products.
6 .\"
7 .\" Licensed under Apache License v2.0. See the file "LICENSE" for more
8 .\" information.
9 .\"
10 .TH lpr 1 "CUPS" "6 December 2018" "Apple Inc."
11 .SH NAME
12 lpr \- print files
13 .SH SYNOPSIS
14 .B lpr
15 [
16 .B \-E
17 ] [
18 \fB\-H \fIserver\fR[\fB:\fIport\fR]
19 ] [
20 .B \-U
21 .I username
22 ] [
23 \fB\-P \fIdestination\fR[\fB/\fIinstance\fR]
24 ] [
25 .B \-#
26 .I num-copies
27 [
28 .B \-h
29 ] [
30 .B \-l
31 ] [
32 .B \-m
33 ] [
34 \fB\-o \fIoption\fR[\fB=\fIvalue\fR]
35 ] [
36 .B \-p
37 ] [
38 .B \-q
39 ] [
40 .B \-r
41 ] [
42 .B \-C
43 .I title
44 ] [
45 .B \-J
46 .I title
47 ] [
48 .B \-T
49 .I title
50 ] [
51 .I file(s)
52 ]
53 .SH DESCRIPTION
54 \fBlpr\fR submits files for printing.
55 Files named on the command line are sent to the named printer or the default destination if no destination is specified.
56 If no files are listed on the command-line, \fBlpr\fR reads the print file from the standard input.
57 .SS THE DEFAULT DESTINATION
58 CUPS provides many ways to set the default destination. The \fBLPDEST\fR and \fBPRINTER\fR environment variables are consulted first.
59 If neither are set, the current default set using the
60 .BR lpoptions (1)
61 command is used, followed by the default set using the
62 .BR lpadmin (8)
63 command.
64 .SH OPTIONS
65 The following options are recognized by \fIlpr\fR:
66 .TP 5
67 .B \-E
68 Forces encryption when connecting to the server.
69 .TP 5
70 \fB\-H \fIserver\fR[\fB:\fIport\fR]
71 Specifies an alternate server.
72 .TP 5
73 \fB\-C "\fIname\fB"\fR
74 .TP 5
75 \fB\-J "\fIname\fB"\fR
76 .TP 5
77 \fB\-T "\fIname\fB"\fR
78 Sets the job name/title.
79 .TP 5
80 \fB\-P \fIdestination\fR[\fB/\fIinstance\fR]
81 Prints files to the named printer.
82 .TP 5
83 \fB\-U \fIusername\fR
84 Specifies an alternate username.
85 .TP 5
86 \fB\-# \fIcopies\fR
87 Sets the number of copies to print.
88 .TP 5
89 .B \-h
90 Disables banner printing. This option is equivalent to \fI-o job\-sheets=none\fR.
91 .TP 5
92 .B \-l
93 Specifies that the print file is already formatted for the destination and should be sent without filtering.
94 This option is equivalent to \fI-o raw\fR.
95 .TP 5
96 .B \-m
97 Send an email on job completion.
98 .TP 5
99 \fB\-o \fIoption\fR[\fB=\fIvalue\fR]
100 Sets a job option.
101 See "COMMON JOB OPTIONS" below.
102 .TP 5
103 .B \-p
104 Specifies that the print file should be formatted with a shaded header with the date, time, job name, and page number.
105 This option is equivalent to \fI\-o prettyprint\fR and is only useful when printing text files.
106 .TP 5
107 .B \-q
108 Hold job for printing.
109 .TP 5
110 .B \-r
111 Specifies that the named print files should be deleted after submitting them.
112 .SS COMMON JOB OPTIONS
113 Aside from the printer-specific options reported by the
114 .BR lpoptions (1)
115 command, the following generic options are available:
116 .TP 5
117 \fB\-o job-sheets=\fIname\fR\fR
118 Prints a cover page (banner) with the document.
119 The "name" can be "classified", "confidential", "secret", "standard", "topsecret", or "unclassified".
120 .TP 5
121 \fB\-o media=\fIsize\fR
122 Sets the page size to \fIsize\fR. Most printers support at least the size names "a4", "letter", and "legal".
123 .TP 5
124 \fB\-o number\-up=\fR{\fI2|4|6|9|16\fR}
125 Prints 2, 4, 6, 9, or 16 document (input) pages on each output page.
126 .TP 5
127 \fB\-o orientation\-requested=4\fR
128 Prints the job in landscape (rotated 90 degrees counter-clockwise).
129 .TP 5
130 \fB\-o orientation\-requested=5\fR
131 Prints the job in landscape (rotated 90 degrees clockwise).
132 .TP 5
133 \fB\-o orientation\-requested=6\fR
134 Prints the job in reverse portrait (rotated 180 degrees).
135 .TP 5
136 \fB\-o print\-quality=3\fR
137 .TP 5
138 \fB\-o print\-quality=4\fR
139 .TP 5
140 \fB\-o print\-quality=5\fR
141 Specifies the output quality - draft (3), normal (4), or best (5).
142 .TP 5
143 \fB\-o sides=one\-sided\fR
144 Prints on one side of the paper.
145 .TP 5
146 \fB\-o sides=two\-sided\-long\-edge\fR
147 Prints on both sides of the paper for portrait output.
148 .TP 5
149 \fB\-o sides=two\-sided\-short\-edge\fR
150 Prints on both sides of the paper for landscape output.
151 .SH NOTES
152 The \fI\-c\fR, \fI\-d\fR, \fI\-f\fR, \fI\-g\fR, \fI\-i\fR, \fI\-n\fR, \fI\-t\fR, \fI\-v\fR, and \fI\-w\fR options are not supported by CUPS and produce a warning message if used.
153 .SH EXAMPLES
154 Print two copies of a document to the default printer:
155 .nf
156
157 lpr -# 2 filename
158
159 .fi
160 Print a double-sided legal document to a printer called "foo":
161 .nf
162
163 lpr -P foo -o media=legal -o sides=two-sided-long-edge filename
164
165 .fi
166 Print a presentation document 2-up to a printer called "foo":
167 .nf
168
169 lpr -P foo -o number-up=2 filename
170 .fi
171 .SH SEE ALSO
172 .BR cancel (1),
173 .BR lp (1),
174 .BR lpadmin (8),
175 .BR lpoptions (1),
176 .BR lpq (1),
177 .BR lprm (1),
178 .BR lpstat (1),
179 CUPS Online Help (http://localhost:631/help)
180 .SH COPYRIGHT
181 Copyright \[co] 2007-2018 by Apple Inc.