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