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