]> git.ipfire.org Git - thirdparty/cups.git/blame - doc/help/man-lp.html
Changelog
[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 13<b>lp</b>
cfa19b58
MS
14[
15<b>-E</b>
16] [
17<b>-U</b>
c277f98c 18<i>username</i>
cfa19b58
MS
19] [
20<b>-c</b>
21] [
22<b>-d </b><i>destination</i>[<b>/</b><i>instance</i>]
23] [
24<b>-h </b><i>hostname</i>[<b>:</b><i>port</i>]
25] [
26<b>-m</b>
27] [
28<b>-n</b>
c277f98c 29<i>num-copies</i>
cfa19b58
MS
30] [
31<b>-o </b><i>option</i>[<b>=</b><i>value</i>]
32] [
33<b>-q</b>
c277f98c 34<i>priority</i>
cfa19b58
MS
35] [
36<b>-s</b>
37] [
38<b>-t</b>
c277f98c 39<i>title</i>
cfa19b58
MS
40] [
41<b>-H</b>
c277f98c 42<i>handling</i>
cfa19b58
MS
43] [
44<b>-P</b>
c277f98c 45<i>page-list</i>
cfa19b58
MS
46] [
47<b>--</b>
48] [
c277f98c
MS
49<i>file(s)</i>
50]
51<br>
52<b>lp</b>
cfa19b58
MS
53[
54<b>-E</b>
55] [
56<b>-U</b>
c277f98c 57<i>username</i>
cfa19b58
MS
58] [
59<b>-c</b>
60] [
61<b>-h </b><i>hostname</i>[<b>:</b><i>port</i>]
62] [
63<b>-i</b>
c277f98c 64<i>job-id</i>
cfa19b58
MS
65] [
66<b>-n</b>
c277f98c 67<i>num-copies</i>
cfa19b58
MS
68] [
69<b>-o </b><i>option</i>[<b>=</b><i>value</i>]
70] [
71<b>-q</b>
c277f98c 72<i>priority</i>
cfa19b58
MS
73] [
74<b>-t</b>
c277f98c 75<i>title</i>
cfa19b58
MS
76] [
77<b>-H</b>
c277f98c 78<i>handling</i>
cfa19b58
MS
79] [
80<b>-P</b>
c277f98c
MS
81<i>page-list</i>
82]
94436c5a 83<h2 class="title"><a name="DESCRIPTION">Description</a></h2>
cfa19b58
MS
84<b>lp</b> submits files for printing or alters a pending job.
85Use a filename of "-" to force printing from the standard input.
86<h3><a name="THE_DEFAULT_DESTINATION">The Default Destination</a></h3>
87CUPS provides many ways to set the default destination. The <b>LPDEST</b> and <b>PRINTER</b> environment variables are consulted first.
88If neither are set, the current default set using the
89<a href="man-lpoptions.html?TOPIC=Man+Pages"><b>lpoptions</b>(1)</a>
90command is used, followed by the default set using the
91<a href="man-lpadmin.html?TOPIC=Man+Pages"><b>lpadmin</b>(8)</a>
92command.
94436c5a
MS
93<h2 class="title"><a name="OPTIONS">Options</a></h2>
94The following options are recognized by <i>lp</i>:
2909c66c 95<dl class="man">
cfa19b58
MS
96<dt><b>--</b>
97<dd style="margin-left: 5.0em">Marks the end of options; use this to print a file whose name begins with a dash (-).
98<dt><b>-E</b>
99<dd style="margin-left: 5.0em">Forces encryption when connecting to the server.
100<dt><b>-U </b><i>username</i>
101<dd style="margin-left: 5.0em">Specifies the username to use when connecting to the server.
102<dt><b>-c</b>
103<dd style="margin-left: 5.0em">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.
104In CUPS, print files are always sent to the scheduler via IPP which has the same effect.
105<dt><b>-d </b><i>destination</i>
106<dd style="margin-left: 5.0em">Prints files to the named printer.
107<dt><b>-h </b><i>hostname</i>[<b>:</b><i>port</i>]
108<dd style="margin-left: 5.0em">Chooses an alternate server.
109<dt><b>-i </b><i>job-id</i>
110<dd style="margin-left: 5.0em">Specifies an existing job to modify.
111<dt><b>-m</b>
112<dd style="margin-left: 5.0em">Sends an email when the job is completed.
113<dt><b>-n </b><i>copies</i>
114<dd style="margin-left: 5.0em">Sets the number of copies to print.
115<dt><b>-o "</b><i>name</i><b>=</b><i>value </i>[ ... <i>name</i><b>=</b><i>value </i>]<b>"</b>
116<dd style="margin-left: 5.0em">Sets one or more job options.
423e6ddb 117See "COMMON JOB OPTIONS" below.
cfa19b58
MS
118<dt><b>-q </b><i>priority</i>
119<dd style="margin-left: 5.0em">Sets the job priority from 1 (lowest) to 100 (highest).
120The default priority is 50.
121<dt><b>-s</b>
122<dd style="margin-left: 5.0em">Do not report the resulting job IDs (silent mode.)
123<dt><b>-t "</b><i>name</i><b>"</b>
124<dd style="margin-left: 5.0em">Sets the job name.
125<dt><b>-H </b><i>hh:mm</i>
126<dd style="margin-left: 5.0em"><dt><b>-H hold</b>
127<dd style="margin-left: 5.0em"><dt><b>-H immediate</b>
128<dd style="margin-left: 5.0em"><dt><b>-H restart</b>
129<dd style="margin-left: 5.0em"><dt><b>-H resume</b>
130<dd style="margin-left: 5.0em">Specifies when the job should be printed.
131A value of <i>immediate</i> will print the file immediately, a value of <i>hold</i> will hold the job indefinitely, and a UTC time value (HH:MM) will hold the job until the specified UTC (not local) time.
132Use a value of <i>resume</i> with the <i>-i</i> option to resume a held job.
133Use a value of <i>restart</i> with the <i>-i</i> option to restart a completed job.
134<dt><b>-P </b><i>page-list</i>
135<dd style="margin-left: 5.0em">Specifies which pages to print in the document.
136The list can contain a list of numbers and ranges (#-#) separated by commas, e.g., "1,3-5,16".
137The 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.
2909c66c 138</dl>
cfa19b58 139<h3><a name="COMMON_JOB_OPTIONS">Common Job Options</a></h3>
94436c5a 140Aside from the printer-specific options reported by the
cfa19b58
MS
141<a href="man-lpoptions.html?TOPIC=Man+Pages"><b>lpoptions</b>(1)</a>
142command, the following generic options are available:
2909c66c 143<dl class="man">
423e6ddb
MS
144<dt><b>-o collate=true</b>
145<dd style="margin-left: 5.0em">Prints collated copies.
146<dt><b>-o fit-to-page</b>
147<dd style="margin-left: 5.0em">Scales the print file to fit on the page.
148<dt><b>-o job-hold-until=</b><i>when</i>
149<dd style="margin-left: 5.0em">Holds the job until the specified local time.
150"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.
151<dt><b>-o job-hold-until=</b><i>hh:mm</i>
152<dd style="margin-left: 5.0em">Holds the job until the specified time in hours and minutes UTC.
153<dt><b>-o job-priority=</b><i>priority</i>
154<dd style="margin-left: 5.0em">Set the priority to a value from 1 (lowest) to 100 (highest), which influences when a job is scheduled for printing.
155The default priority is typically 50.
156<dt><b>-o job-sheets=</b><i>name</i>
157<dd style="margin-left: 5.0em">Prints a cover page (banner) with the document.
158The "name" can be "classified", "confidential", "secret", "standard", "topsecret", or "unclassified".
159<dt><b>-o job-sheets=</b><i>start-name,end-name</i>
160<dd style="margin-left: 5.0em">Prints cover pages (banners) with the document.
cfa19b58
MS
161<dt><b>-o media=</b><i>size</i>
162<dd style="margin-left: 5.0em">Sets the page size to <i>size</i>. Most printers support at least the size names "a4", "letter", and "legal".
423e6ddb
MS
163<dt><b>-o mirror</b>
164<dd style="margin-left: 5.0em">Mirrors each page.
165<dt><b>-o number-up=</b>{<i>2|4|6|9|16</i>}
166<dd style="margin-left: 5.0em">Prints 2, 4, 6, 9, or 16 document (input) pages on each output page.
167<dt><b>-o number-up-layout=</b><i>layout</i>
168<dd style="margin-left: 5.0em">Specifies the layout of pages with the "number-up" option.
169The "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.
170"bt" is bottom-to-top, "lr" is left-to-right, "rl" is right-to-left, and "tb" is top-to-bottom.
cfa19b58 171<dt><b>-o orientation-requested=4</b>
423e6ddb
MS
172<dd style="margin-left: 5.0em">Prints the job in landscape (rotated 90 degrees counter-clockwise).
173<dt><b>-o orientation-requested=5</b>
174<dd style="margin-left: 5.0em">Prints the job in landscape (rotated 90 degrees clockwise).
175<dt><b>-o orientation-requested=6</b>
176<dd style="margin-left: 5.0em">Prints the job in reverse portrait (rotated 180 degrees).
177<dt><b>-o outputorder=reverse</b>
178<dd style="margin-left: 5.0em">Prints pages in reverse order.
179<dt><b>-o page-border=</b><i>border</i>
180<dd style="margin-left: 5.0em">Prints a border around each document page.
181"border" is "double", "double-thick", "single", or "single-thick".
182<dt><b>-o page-ranges=</b><i>page-list</i>
183<dd style="margin-left: 5.0em">Specifies which pages to print in the document.
184The list can contain a list of numbers and ranges (#-#) separated by commas, e.g., "1,3-5,16".
185The 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.
cfa19b58
MS
186<dt><b>-o sides=one-sided</b>
187<dd style="margin-left: 5.0em">Prints on one side of the paper.
188<dt><b>-o sides=two-sided-long-edge</b>
189<dd style="margin-left: 5.0em">Prints on both sides of the paper for portrait output.
190<dt><b>-o sides=two-sided-short-edge</b>
191<dd style="margin-left: 5.0em">Prints on both sides of the paper for landscape output.
2909c66c 192</dl>
cfa19b58
MS
193<h2 class="title"><a name="CONFORMING_TO">Conforming To</a></h2>
194Unlike the System V printing system, CUPS allows printer names to contain any printable character except SPACE, TAB, "/", or "#".
195Also, printer and class names are <i>not</i> case-sensitive.
196<p>The <i>-q</i> 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).
94436c5a 197<h2 class="title"><a name="EXAMPLES">Examples</a></h2>
cfa19b58 198Print two copies of a document to the default printer:
2909c66c 199<pre class="man">
cfa19b58
MS
200
201 lp -n 2 filename
202
94436c5a 203</pre>
cfa19b58 204Print a double-sided legal document to a printer called "foo":
2909c66c 205<pre class="man">
cfa19b58
MS
206
207 lp -d foo -o media=legal -o sides=two-sided-long-edge filename
208
94436c5a 209</pre>
cfa19b58 210Print a presentation document 2-up to a printer called "foo":
2909c66c 211<pre class="man">
cfa19b58
MS
212
213 lp -d foo -o number-up=2 filename
94436c5a 214</pre>
94436c5a 215<h2 class="title"><a name="SEE_ALSO">See Also</a></h2>
cfa19b58
MS
216<a href="man-cancel.html?TOPIC=Man+Pages"><b>cancel</b>(1),</a>
217<a href="man-lpadmin.html?TOPIC=Man+Pages"><b>lpadmin</b>(8),</a>
218<a href="man-lpoptions.html?TOPIC=Man+Pages"><b>lpoptions</b>(1),</a>
219<a href="man-lpq.html?TOPIC=Man+Pages"><b>lpq</b>(1),</a>
220<a href="man-lpr.html?TOPIC=Man+Pages"><b>lpr</b>(1),</a>
221<a href="man-lprm.html?TOPIC=Man+Pages"><b>lprm</b>(1),</a>
222<a href="man-lpstat.html?TOPIC=Man+Pages"><b>lpstat</b>(1),</a>
223CUPS Online Help (<a href="http://localhost:631/help">http://localhost:631/help</a>)
94436c5a 224<h2 class="title"><a name="COPYRIGHT">Copyright</a></h2>
afad2da2 225Copyright &copy; 2007-2018 by Apple Inc.
94436c5a
MS
226
227</body>
228</html>