]> git.ipfire.org Git - thirdparty/cups.git/blame - doc/help/man-lp.html
More man page updates.
[thirdparty/cups.git] / doc / help / man-lp.html
CommitLineData
c277f98c 1<!DOCTYPE HTML>
94436c5a
MS
2<html>
3<!-- SECTION: Man Pages -->
4<head>
5 <link rel="stylesheet" type="text/css" href="../cups-printable.css">
6 <title>lp(1)</title>
7</head>
8<body>
9<h1 class="title">lp(1)</h1>
10<h2 class="title"><a name="NAME">Name</a></h2>
11lp - print files
12<h2 class="title"><a name="SYNOPSIS">Synopsis</a></h2>
c277f98c
MS
13<b>lp</b>
14[ -E ] [ -U
15<i>username</i>
16] [ -c ] [ -d
17<i>destination[/instance]</i>
18] [ -h
19<i>hostname[:port]</i>
20] [ -m ] [ -n
21<i>num-copies</i>
22] [ -o
23<i>option[=value]</i>
24] [ -q
25<i>priority</i>
26] [ -s ] [ -t
27<i>title</i>
28] [ -H
29<i>handling</i>
30] [ -P
31<i>page-list</i>
32] [ -- ] [
33<i>file(s)</i>
34]
35<br>
36<b>lp</b>
37[ -E ] [ -U
38<i>username</i>
39] [ -c ] [ -h
40<i>hostname[:port]</i>
41] [ -i
42<i>job-id</i>
43] [ -n
44<i>num-copies</i>
45] [ -o
46<i>option[=value]</i>
47] [ -q
48<i>priority</i>
49] [ -t
50<i>title</i>
51] [ -H
52<i>handling</i>
53] [ -P
54<i>page-list</i>
55]
94436c5a
MS
56<h2 class="title"><a name="DESCRIPTION">Description</a></h2>
57<i>lp</i> submits files for printing or alters a pending job. Use
58a filename of "-" to force printing from the standard input.
59<h2 class="title"><a name="THE_DEFAULT_DESTINATION">The Default Destination</a></h2>
60CUPS provides many ways to set the default destination. The "LPDEST" and
61"PRINTER" environment variables are consulted first. If neither are set,
c277f98c
MS
62the current default set using the <i>lpoptions(1)</i> command is used,
63followed by the default set using the <i>lpadmin(8)</i> command.
94436c5a
MS
64<h2 class="title"><a name="OPTIONS">Options</a></h2>
65The following options are recognized by <i>lp</i>:
c277f98c
MS
66<p style="margin-left: 5.0em; text-indent: -5.0em">--
67<br>
68<br>
69Marks the end of options; use this to print a file whose name
94436c5a 70begins with a dash (-).
c277f98c
MS
71<p style="margin-left: 5.0em; text-indent: -5.0em">-E
72<br>
73<br>
74Forces encryption when connecting to the server.
75<p style="margin-left: 5.0em; text-indent: -5.0em">-U username
76<br>
77<br>
78Specifies the username to use when connecting to the server.
79<p style="margin-left: 5.0em; text-indent: -5.0em">-c
80<br>
81<br>
82This option is provided for backwards-compatibility only. On
94436c5a
MS
83systems that support it, this option forces the print file to be
84copied to the spool directory before printing. In CUPS, print
85files are always sent to the scheduler via IPP which has the
86same effect.
c277f98c
MS
87<p style="margin-left: 5.0em; text-indent: -5.0em">-d destination
88<br>
89<br>
90Prints files to the named printer.
91<p style="margin-left: 5.0em; text-indent: -5.0em">-h hostname[:port]
92<br>
93<br>
94Chooses an alternate server.
95<p style="margin-left: 5.0em; text-indent: -5.0em">-i job-id
96<br>
97<br>
98Specifies an existing job to modify.
99<p style="margin-left: 5.0em; text-indent: -5.0em">-m
100<br>
101<br>
102Sends an email when the job is completed.
103<p style="margin-left: 5.0em; text-indent: -5.0em">-n copies
104<br>
105<br>
106Sets the number of copies to print from 1 to 100.
107<p style="margin-left: 5.0em; text-indent: -5.0em">-o "name=value [name=value ...]"
108<br>
109<br>
110Sets one or more job options.
111<p style="margin-left: 5.0em; text-indent: -5.0em">-q priority
112<br>
113<br>
114Sets the job priority from 1 (lowest) to 100 (highest). The
94436c5a 115default priority is 50.
c277f98c
MS
116<p style="margin-left: 5.0em; text-indent: -5.0em">-s
117<br>
118<br>
119Do not report the resulting job IDs (silent mode.)
120<p style="margin-left: 5.0em; text-indent: -5.0em">-t "name"
121<br>
122<br>
123Sets the job name.
124<p style="margin-left: 5.0em; text-indent: -5.0em">-H hh:mm
125<br>
126<p style="margin-left: 5.0em; text-indent: -5.0em">-H hold
127<br>
128<p style="margin-left: 5.0em; text-indent: -5.0em">-H immediate
129<br>
130<p style="margin-left: 5.0em; text-indent: -5.0em">-H restart
131<br>
132<p style="margin-left: 5.0em; text-indent: -5.0em">-H resume
133<br>
134<br>
135Specifies when the job should be printed. A value of <i>immediate</i> will print
94436c5a
MS
136the file immediately, a value of <i>hold</i> will hold the job indefinitely, and
137a UTC time value (HH:MM) will hold the job until the specified UTC (not local)
138time. Use a value of <i>resume</i> with the <i>-i</i> option to resume a held job.
139Use a value of <i>restart</i> with the <i>-i</i> option to restart
140a completed job.
c277f98c
MS
141<p style="margin-left: 5.0em; text-indent: -5.0em">-P page-list
142<br>
143<br>
144Specifies which pages to print in the document. The list can
94436c5a
MS
145contain a list of numbers and ranges (#-#) separated by commas
146(e.g. 1,3-5,16). The page numbers refer to the output pages and
147not the document's original pages - options like "number-up" can
148affect the numbering of the pages.
94436c5a
MS
149<h2 class="title"><a name="COMMON_JOB_OPTIONS">Common Job Options</a></h2>
150Aside from the printer-specific options reported by the
c277f98c 151<i>lpoptions(1)</i> command, the following generic options are
94436c5a 152available:
c277f98c
MS
153<p style="margin-left: 5.0em; text-indent: -5.0em">-o media=size
154<br>
155<br>
156Sets the page size to <i>size</i>. Most printers support at least
94436c5a 157the size names "a4", "letter", and "legal".
c277f98c
MS
158<p style="margin-left: 5.0em; text-indent: -5.0em">-o landscape
159<br>
160<p style="margin-left: 5.0em; text-indent: -5.0em">-o orientation-requested=4
161<br>
162<br>
163Prints the job in landscape (rotated 90 degrees).
164<p style="margin-left: 5.0em; text-indent: -5.0em">-o sides=one-sided
165<br>
166<p style="margin-left: 5.0em; text-indent: -5.0em">-o sides=two-sided-long-edge
167<br>
168<p style="margin-left: 5.0em; text-indent: -5.0em">-o sides=two-sided-short-edge
169<br>
170<br>
171Prints on one or two sides of the paper. The value
94436c5a
MS
172"two-sided-long-edge" is normally used when printing portrait
173(unrotated) pages, while "two-sided-short-edge" is used for
174landscape pages.
c277f98c
MS
175<p style="margin-left: 5.0em; text-indent: -5.0em">-o fit-to-page
176<br>
177<br>
178Scales the print file to fit on the page.
179<p style="margin-left: 5.0em; text-indent: -5.0em">-o number-up=2
180<br>
181<p style="margin-left: 5.0em; text-indent: -5.0em">-o number-up=4
182<br>
183<p style="margin-left: 5.0em; text-indent: -5.0em">-o number-up=6
184<br>
185<p style="margin-left: 5.0em; text-indent: -5.0em">-o number-up=9
186<br>
187<p style="margin-left: 5.0em; text-indent: -5.0em">-o number-up=16
188<br>
189<br>
190Prints multiple document pages on each output page.
191<p style="margin-left: 5.0em; text-indent: -5.0em">-o cpi=N
192<br>
193<br>
194Sets the number of characters per inch to use when printing a
94436c5a 195text file. The default is 10.
c277f98c
MS
196<p style="margin-left: 5.0em; text-indent: -5.0em">-o lpi=N
197<br>
198<br>
199Sets the number of lines per inch to use when printing a text
94436c5a 200file. The default is 6.
c277f98c
MS
201<p style="margin-left: 5.0em; text-indent: -5.0em">-o page-bottom=N
202<br>
203<p style="margin-left: 5.0em; text-indent: -5.0em">-o page-left=N
204<br>
205<p style="margin-left: 5.0em; text-indent: -5.0em">-o page-right=N
206<br>
207<p style="margin-left: 5.0em; text-indent: -5.0em">-o page-top=N
208<br>
209<br>
210Sets the page margins when printing text files. The values are in
94436c5a 211points - there are 72 points to the inch.
94436c5a
MS
212<h2 class="title"><a name="EXAMPLES">Examples</a></h2>
213Print a double-sided legal document to a printer called "foo":
214<pre>
215 lp -d foo -o media=legal -o sides=two-sided-long-edge filename
216</pre>
217<p>Print an image across 4 pages:
218<pre>
219 lp -d bar -o scaling=200 filename
220</pre>
221<p>Print a text file with 12 characters per inch, 8 lines per inch, and
222a 1 inch left margin:
223<pre>
224 lp -d bar -o cpi=12 -o lpi=8 -o page-left=72 filename
225</pre>
226<h2 class="title"><a name="COMPATIBILITY">Compatibility</a></h2>
227Unlike the System V printing system, CUPS allows printer names to
228contain any printable character except SPACE, TAB, "/", or "#".
229Also, printer and class names are <i>not</i> case-sensitive.
230<p>The "q" option accepts a different range of values than the
231Solaris lp command, matching the IPP job priority values (1-100,
232100 is highest priority) instead of the Solaris values (0-39, 0
233is highest priority).
234<h2 class="title"><a name="SEE_ALSO">See Also</a></h2>
c277f98c
MS
235<i>cancel(1)</i>, <i>lpadmin(8)</i>, <i>lpmove(8)</i>, <i>lpoptions(1)</i>,
236<i>lpstat(1)</i>,
94436c5a 237<br>
c277f98c 238<a href="http://localhost:631/help">http://localhost:631/help</a>
94436c5a
MS
239<h2 class="title"><a name="COPYRIGHT">Copyright</a></h2>
240Copyright 2007-2013 by Apple Inc.
241
242</body>
243</html>