]> git.ipfire.org Git - thirdparty/cups.git/blob - man/lp.man
License change: Apache License, Version 2.0.
[thirdparty/cups.git] / man / lp.man
1 .\"
2 .\" lp man page for CUPS.
3 .\"
4 .\" Copyright 2007-2016 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 information.
8 .\"
9 .TH lp 1 "CUPS" "2 May 2016" "Apple Inc."
10 .SH NAME
11 lp \- print files
12 .SH SYNOPSIS
13 .B lp
14 [
15 .B \-E
16 ] [
17 .B \-U
18 .I username
19 ] [
20 .B \-c
21 ] [
22 \fB\-d \fIdestination\fR[\fB/\fIinstance\fR]
23 ] [
24 \fB\-h \fIhostname\fR[\fB:\fIport\fR]
25 ] [
26 .B \-m
27 ] [
28 .B \-n
29 .I num-copies
30 ] [
31 \fB\-o \fIoption\fR[\fB=\fIvalue\fR]
32 ] [
33 .B \-q
34 .I priority
35 ] [
36 .B \-s
37 ] [
38 .B \-t
39 .I title
40 ] [
41 .B \-H
42 .I handling
43 ] [
44 .B \-P
45 .I page-list
46 ] [
47 .B \-\-
48 ] [
49 .I file(s)
50 ]
51 .br
52 .B lp
53 [
54 .B \-E
55 ] [
56 .B \-U
57 .I username
58 ] [
59 .B \-c
60 ] [
61 \fB\-h \fIhostname\fR[\fB:\fIport\fR]
62 ] [
63 .B \-i
64 .I job-id
65 ] [
66 .B \-n
67 .I num-copies
68 ] [
69 \fB\-o \fIoption\fR[\fB=\fIvalue\fR]
70 ] [
71 .B \-q
72 .I priority
73 ] [
74 .B \-t
75 .I title
76 ] [
77 .B \-H
78 .I handling
79 ] [
80 .B \-P
81 .I page-list
82 ]
83 .SH DESCRIPTION
84 \fBlp\fR submits files for printing or alters a pending job.
85 Use a filename of "-" to force printing from the standard input.
86 .SS THE DEFAULT DESTINATION
87 CUPS provides many ways to set the default destination. The \fBLPDEST\fR and \fBPRINTER\fR environment variables are consulted first.
88 If neither are set, the current default set using the
89 .BR lpoptions (1)
90 command is used, followed by the default set using the
91 .BR lpadmin (8)
92 command.
93 .SH OPTIONS
94 The following options are recognized by \fIlp\fR:
95 .TP 5
96 .B \-\-
97 Marks the end of options; use this to print a file whose name begins with a dash (\-).
98 .TP 5
99 .B \-E
100 Forces encryption when connecting to the server.
101 .TP 5
102 \fB\-U \fIusername\fR
103 Specifies the username to use when connecting to the server.
104 .TP 5
105 .B \-c
106 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.
107 In CUPS, print files are always sent to the scheduler via IPP which has the same effect.
108 .TP 5
109 \fB\-d \fIdestination\fR
110 Prints files to the named printer.
111 .TP 5
112 \fB\-h \fIhostname\fR[\fB:\fIport\fR]
113 Chooses an alternate server.
114 .TP 5
115 \fB\-i \fIjob-id\fR
116 Specifies an existing job to modify.
117 .TP 5
118 .B \-m
119 Sends an email when the job is completed.
120 .TP 5
121 \fB\-n \fIcopies\fR
122 Sets the number of copies to print.
123 .TP 5
124 \fB\-o "\fIname\fB=\fIvalue \fR[ ... \fIname\fB=\fIvalue \fR]\fB"\fR
125 Sets one or more job options.
126 See "COMMON JOB OPTIONS" below.
127 .TP 5
128 \fB\-q \fIpriority\fR
129 Sets the job priority from 1 (lowest) to 100 (highest).
130 The default priority is 50.
131 .TP 5
132 .B \-s
133 Do not report the resulting job IDs (silent mode.)
134 .TP 5
135 \fB\-t "\fIname\fB"\fR
136 Sets the job name.
137 .TP 5
138 \fB\-H \fIhh:mm\fR
139 .TP 5
140 \fB\-H hold\fR
141 .TP 5
142 \fB-H immediate\fR
143 .TP 5
144 \fB-H restart\fR
145 .TP 5
146 \fB-H resume\fR
147 Specifies when the job should be printed.
148 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.
149 Use a value of \fIresume\fR with the \fI-i\fR option to resume a held job.
150 Use a value of \fIrestart\fR with the \fI-i\fR option to restart a completed job.
151 .TP 5
152 \fB\-P \fIpage-list\fR
153 Specifies which pages to print in the document.
154 The list can contain a list of numbers and ranges (#-#) separated by commas, e.g., "1,3-5,16".
155 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.
156 .SS COMMON JOB OPTIONS
157 Aside from the printer-specific options reported by the
158 .BR lpoptions (1)
159 command, the following generic options are available:
160 .TP 5
161 \fB\-o collate=true\fR
162 Prints collated copies.
163 .TP 5
164 \fB\-o fit\-to\-page\fR
165 Scales the print file to fit on the page.
166 .TP 5
167 \fB\-o job-hold-until=\fIwhen\fR
168 Holds the job until the specified local time.
169 "when" can be "indefinite" to hold the until released, "day-time" to print the job between 6am and 6pm local time, "night" to print the job between 6pm and 6am local time, "second-shift" to print the job between 4pm and 12am local time, "third-shift" to print the job between 12am and 8am local time, or "weekend" to print the job on Saturday or Sunday.
170 .TP 5
171 \fB\-o job-hold-until=\fIhh:mm\fR
172 Holds the job until the specified time in hours and minutes UTC.
173 .TP 5
174 \fB\-o job-priority=\fIpriority\fR
175 Set the priority to a value from 1 (lowest) to 100 (highest), which influences when a job is scheduled for printing.
176 The default priority is typically 50.
177 .TP 5
178 \fB\-o job-sheets=\fIname\fR\fR
179 Prints a cover page (banner) with the document.
180 The "name" can be "classified", "confidential", "secret", "standard", "topsecret", or "unclassified".
181 .TP 5
182 \fB\-o job-sheets=\fIstart-name,end-name\fR\fR
183 Prints cover pages (banners) with the document.
184 .TP 5
185 \fB\-o media=\fIsize\fR
186 Sets the page size to \fIsize\fR. Most printers support at least the size names "a4", "letter", and "legal".
187 .TP 5
188 \fB\-o mirror\fR
189 Mirrors each page.
190 .TP 5
191 \fB\-o number\-up=\fR{\fI2|4|6|9|16\fR}
192 Prints 2, 4, 6, 9, or 16 document (input) pages on each output page.
193 .TP 5
194 \fB\-o number\-up\-layout=\fIlayout\fR
195 Specifies the layout of pages with the "number-up" option.
196 The "layout" string can be "btlr", "btrl", "lrbt", "lrtb", "rlbt", "rltb", "tblr", or "tbrl" - the first two letters determine the column order while the second two letters determine the row order.
197 "bt" is bottom-to-top, "lr" is left-to-right, "rl" is right-to-left, and "tb" is top-to-bottom.
198 .TP 5
199 \fB\-o orientation\-requested=4\fR
200 Prints the job in landscape (rotated 90 degrees counter-clockwise).
201 .TP 5
202 \fB\-o orientation\-requested=5\fR
203 Prints the job in landscape (rotated 90 degrees clockwise).
204 .TP 5
205 \fB\-o orientation\-requested=6\fR
206 Prints the job in reverse portrait (rotated 180 degrees).
207 .TP 5
208 \fB\-o outputorder=reverse\fR
209 Prints pages in reverse order.
210 .TP 5
211 \fB\-o page\-border=\fIborder\fR
212 Prints a border around each document page.
213 "border" is "double", "double\-thick", "single", or "single\-thick".
214 .TP 5
215 \fB\-o page\-ranges=\fIpage-list\fR
216 Specifies which pages to print in the document.
217 The list can contain a list of numbers and ranges (#-#) separated by commas, e.g., "1,3-5,16".
218 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.
219 .TP 5
220 \fB\-o sides=one\-sided\fR
221 Prints on one side of the paper.
222 .TP 5
223 \fB\-o sides=two\-sided\-long\-edge\fR
224 Prints on both sides of the paper for portrait output.
225 .TP 5
226 \fB\-o sides=two\-sided\-short\-edge\fR
227 Prints on both sides of the paper for landscape output.
228 .SH CONFORMING TO
229 Unlike the System V printing system, CUPS allows printer names to contain any printable character except SPACE, TAB, "/", or "#".
230 Also, printer and class names are \fInot\fR case-sensitive.
231 .LP
232 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).
233 .SH EXAMPLES
234 Print two copies of a document to the default printer:
235 .nf
236
237 lp -n 2 filename
238
239 .fi
240 Print a double-sided legal document to a printer called "foo":
241 .nf
242
243 lp -d foo -o media=legal -o sides=two-sided-long-edge filename
244
245 .fi
246 Print a presentation document 2-up to a printer called "foo":
247 .nf
248
249 lp -d foo -o number-up=2 filename
250 .fi
251 .SH SEE ALSO
252 .BR cancel (1),
253 .BR lpadmin (8),
254 .BR lpoptions (1),
255 .BR lpq (1),
256 .BR lpr (1),
257 .BR lprm (1),
258 .BR lpstat (1),
259 CUPS Online Help (http://localhost:631/help)
260 .SH COPYRIGHT
261 Copyright \[co] 2007-2017 by Apple Inc.