]> git.ipfire.org Git - thirdparty/cups.git/blob - man/lp.man
9cde2c5eecc20f50d23c0b0b0c62d557f3760479
[thirdparty/cups.git] / man / lp.man
1 .\"
2 .\" lp 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 lp 1 "CUPS" "6 December 2018" "Apple Inc."
11 .SH NAME
12 lp \- print files
13 .SH SYNOPSIS
14 .B lp
15 [
16 .B \-E
17 ] [
18 .B \-U
19 .I username
20 ] [
21 .B \-c
22 ] [
23 \fB\-d \fIdestination\fR[\fB/\fIinstance\fR]
24 ] [
25 \fB\-h \fIhostname\fR[\fB:\fIport\fR]
26 ] [
27 .B \-m
28 ] [
29 .B \-n
30 .I num-copies
31 ] [
32 \fB\-o \fIoption\fR[\fB=\fIvalue\fR]
33 ] [
34 .B \-q
35 .I priority
36 ] [
37 .B \-s
38 ] [
39 .B \-t
40 .I title
41 ] [
42 .B \-H
43 .I handling
44 ] [
45 .B \-P
46 .I page-list
47 ] [
48 .B \-\-
49 ] [
50 .I file(s)
51 ]
52 .br
53 .B lp
54 [
55 .B \-E
56 ] [
57 .B \-U
58 .I username
59 ] [
60 .B \-c
61 ] [
62 \fB\-h \fIhostname\fR[\fB:\fIport\fR]
63 ] [
64 .B \-i
65 .I job-id
66 ] [
67 .B \-n
68 .I num-copies
69 ] [
70 \fB\-o \fIoption\fR[\fB=\fIvalue\fR]
71 ] [
72 .B \-q
73 .I priority
74 ] [
75 .B \-t
76 .I title
77 ] [
78 .B \-H
79 .I handling
80 ] [
81 .B \-P
82 .I page-list
83 ]
84 .SH DESCRIPTION
85 \fBlp\fR submits files for printing or alters a pending job.
86 Use a filename of "-" to force printing from the standard input.
87 .SS THE DEFAULT DESTINATION
88 CUPS provides many ways to set the default destination. The \fBLPDEST\fR and \fBPRINTER\fR environment variables are consulted first.
89 If neither are set, the current default set using the
90 .BR lpoptions (1)
91 command is used, followed by the default set using the
92 .BR lpadmin (8)
93 command.
94 .SH OPTIONS
95 The following options are recognized by \fIlp\fR:
96 .TP 5
97 .B \-\-
98 Marks the end of options; use this to print a file whose name begins with a dash (\-).
99 .TP 5
100 .B \-E
101 Forces encryption when connecting to the server.
102 .TP 5
103 \fB\-U \fIusername\fR
104 Specifies the username to use when connecting to the server.
105 .TP 5
106 .B \-c
107 This option is provided for backwards-compatibility only. On systems that support it, this option forces the print file to be copied to the spool directory before printing.
108 In CUPS, print files are always sent to the scheduler via IPP which has the same effect.
109 .TP 5
110 \fB\-d \fIdestination\fR
111 Prints files to the named printer.
112 .TP 5
113 \fB\-h \fIhostname\fR[\fB:\fIport\fR]
114 Chooses an alternate server.
115 .TP 5
116 \fB\-i \fIjob-id\fR
117 Specifies an existing job to modify.
118 .TP 5
119 .B \-m
120 Sends an email when the job is completed.
121 .TP 5
122 \fB\-n \fIcopies\fR
123 Sets the number of copies to print.
124 .TP 5
125 \fB\-o "\fIname\fB=\fIvalue \fR[ ... \fIname\fB=\fIvalue \fR]\fB"\fR
126 Sets one or more job options.
127 See "COMMON JOB OPTIONS" below.
128 .TP 5
129 \fB\-q \fIpriority\fR
130 Sets the job priority from 1 (lowest) to 100 (highest).
131 The default priority is 50.
132 .TP 5
133 .B \-s
134 Do not report the resulting job IDs (silent mode.)
135 .TP 5
136 \fB\-t "\fIname\fB"\fR
137 Sets the job name.
138 .TP 5
139 \fB\-H \fIhh:mm\fR
140 .TP 5
141 \fB\-H hold\fR
142 .TP 5
143 \fB-H immediate\fR
144 .TP 5
145 \fB-H restart\fR
146 .TP 5
147 \fB-H resume\fR
148 Specifies when the job should be printed.
149 A value of \fIimmediate\fR will print the file immediately, a value of \fIhold\fR will hold the job indefinitely, and a UTC time value (HH:MM) will hold the job until the specified UTC (not local) time.
150 Use a value of \fIresume\fR with the \fI-i\fR option to resume a held job.
151 Use a value of \fIrestart\fR with the \fI-i\fR option to restart a completed job.
152 .TP 5
153 \fB\-P \fIpage-list\fR
154 Specifies which pages to print in the document.
155 The list can contain a list of numbers and ranges (#-#) separated by commas, e.g., "1,3-5,16".
156 The page numbers refer to the output pages and not the document's original pages - options like "number-up" can affect the numbering of the pages.
157 .SS COMMON JOB OPTIONS
158 Aside from the printer-specific options reported by the
159 .BR lpoptions (1)
160 command, the following generic options are available:
161 .TP 5
162 \fB\-o job-sheets=\fIname\fR\fR
163 Prints a cover page (banner) with the document.
164 The "name" can be "classified", "confidential", "secret", "standard", "topsecret", or "unclassified".
165 .TP 5
166 \fB\-o media=\fIsize\fR
167 Sets the page size to \fIsize\fR. Most printers support at least the size names "a4", "letter", and "legal".
168 .TP 5
169 \fB\-o number\-up=\fR{\fI2|4|6|9|16\fR}
170 Prints 2, 4, 6, 9, or 16 document (input) pages on each output page.
171 .TP 5
172 \fB\-o orientation\-requested=4\fR
173 Prints the job in landscape (rotated 90 degrees counter-clockwise).
174 .TP 5
175 \fB\-o orientation\-requested=5\fR
176 Prints the job in landscape (rotated 90 degrees clockwise).
177 .TP 5
178 \fB\-o orientation\-requested=6\fR
179 Prints the job in reverse portrait (rotated 180 degrees).
180 .TP 5
181 \fB\-o print\-quality=3\fR
182 .TP 5
183 \fB\-o print\-quality=4\fR
184 .TP 5
185 \fB\-o print\-quality=5\fR
186 Specifies the output quality - draft (3), normal (4), or best (5).
187 .TP 5
188 \fB\-o sides=one\-sided\fR
189 Prints on one side of the paper.
190 .TP 5
191 \fB\-o sides=two\-sided\-long\-edge\fR
192 Prints on both sides of the paper for portrait output.
193 .TP 5
194 \fB\-o sides=two\-sided\-short\-edge\fR
195 Prints on both sides of the paper for landscape output.
196 .SH CONFORMING TO
197 Unlike the System V printing system, CUPS allows printer names to contain any printable character except SPACE, TAB, "/", or "#".
198 Also, printer and class names are \fInot\fR case-sensitive.
199 .LP
200 The \fI-q\fR option accepts a different range of values than the Solaris lp command, matching the IPP job priority values (1-100, 100 is highest priority) instead of the Solaris values (0-39, 0 is highest priority).
201 .SH EXAMPLES
202 Print two copies of a document to the default printer:
203 .nf
204
205 lp -n 2 filename
206
207 .fi
208 Print a double-sided legal document to a printer called "foo":
209 .nf
210
211 lp -d foo -o media=legal -o sides=two-sided-long-edge filename
212
213 .fi
214 Print a presentation document 2-up to a printer called "bar":
215 .nf
216
217 lp -d bar -o number-up=2 filename
218 .fi
219 .SH SEE ALSO
220 .BR cancel (1),
221 .BR lpadmin (8),
222 .BR lpoptions (1),
223 .BR lpq (1),
224 .BR lpr (1),
225 .BR lprm (1),
226 .BR lpstat (1),
227 CUPS Online Help (http://localhost:631/help)
228 .SH COPYRIGHT
229 Copyright \[co] 2007-2018 by Apple Inc.