1 <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
3 <!-- SECTION: Man Pages -->
5 <link rel=
"stylesheet" type=
"text/css" href=
"../cups-printable.css">
9 <h1 class=
"title">lp(
1)
</h1>
10 <h2 class=
"title"><a name=
"NAME">Name
</a></h2>
12 <h2 class=
"title"><a name=
"SYNOPSIS">Synopsis
</a></h2>
17 <i>destination[/instance]
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
<a href='man-lpoptions.html?TOPIC=Man+Pages'
>lpoptions(
1)
</a> command is used,
63 followed by the default set using the
<a href='man-lpadmin.html?TOPIC=Man+Pages'
>lpadmin(
8)
</a> command.
64 <h2 class=
"title"><a name=
"OPTIONS">Options
</a></h2>
65 The following options are recognized by
<i>lp
</i>:
70 <dd>Marks the end of options; use this to print a file whose name
71 begins with a dash (-).
76 <dd>Forces encryption when connecting to the server.
81 <dd>Specifies the username to use when connecting to the server.
86 <dd>This option is provided for backwards-compatibility only. On
87 systems that support it, this option forces the print file to be
88 copied to the spool directory before printing. In CUPS, print
89 files are always sent to the scheduler via IPP which has the
95 <dd>Prints files to the named printer.
97 <dt>-h hostname[:port]
100 <dd>Chooses an alternate server.
105 <dd>Specifies an existing job to modify.
110 <dd>Sends an email when the job is completed.
115 <dd>Sets the number of copies to print from
1 to
100.
117 <dt>-o
"name=value [name=value ...]"
120 <dd>Sets one or more job options.
125 <dd>Sets the job priority from
1 (lowest) to
100 (highest). The
126 default priority is
50.
131 <dd>Do not report the resulting job IDs (silent mode.)
136 <dd>Sets the job name.
153 <dd>Specifies when the job should be printed. A value of
<i>immediate
</i> will print
154 the file immediately, a value of
<i>hold
</i> will hold the job indefinitely, and
155 a UTC time value (HH:MM) will hold the job until the specified UTC (not local)
156 time. Use a value of
<i>resume
</i> with the
<i>-i
</i> option to resume a held job.
157 Use a value of
<i>restart
</i> with the
<i>-i
</i> option to restart
163 <dd>Specifies which pages to print in the document. The list can
164 contain a list of numbers and ranges (#-#) separated by commas
165 (e.g.
1,
3-
5,
16). The page numbers refer to the output pages and
166 not the document's original pages - options like
"number-up" can
167 affect the numbering of the pages.
170 <h2 class=
"title"><a name=
"COMMON_JOB_OPTIONS">Common Job Options
</a></h2>
171 Aside from the printer-specific options reported by the
172 <a href='man-lpoptions.html?TOPIC=Man+Pages'
>lpoptions(
1)
</a> command, the following generic options are
178 <dd>Sets the page size to
<i>size
</i>. Most printers support at least
179 the size names
"a4",
"letter", and
"legal".
184 <dt>-o orientation-requested=
4
187 <dd>Prints the job in landscape (rotated
90 degrees).
189 <dt>-o sides=one-sided
192 <dt>-o sides=two-sided-long-edge
195 <dt>-o sides=two-sided-short-edge
198 <dd>Prints on one or two sides of the paper. The value
199 "two-sided-long-edge" is normally used when printing portrait
200 (unrotated) pages, while
"two-sided-short-edge" is used for
206 <dd>Scales the print file to fit on the page.
223 <dd>Prints multiple document pages on each output page.
228 <dd>Sets the number of characters per inch to use when printing a
229 text file. The default is
10.
234 <dd>Sets the number of lines per inch to use when printing a text
235 file. The default is
6.
249 <dd>Sets the page margins when printing text files. The values are in
250 points - there are
72 points to the inch.
253 <h2 class=
"title"><a name=
"EXAMPLES">Examples
</a></h2>
254 Print a double-sided legal document to a printer called
"foo":
256 lp -d foo -o media=legal -o sides=two-sided-long-edge filename
258 <p>Print an image across
4 pages:
260 lp -d bar -o scaling=
200 filename
262 <p>Print a text file with
12 characters per inch,
8 lines per inch, and
263 a
1 inch left margin:
265 lp -d bar -o cpi=
12 -o lpi=
8 -o page-left=
72 filename
267 <h2 class=
"title"><a name=
"COMPATIBILITY">Compatibility
</a></h2>
268 Unlike the System V printing system, CUPS allows printer names to
269 contain any printable character except SPACE, TAB,
"/", or
"#".
270 Also, printer and class names are
<i>not
</i> case-sensitive.
271 <p>The
"q" option accepts a different range of values than the
272 Solaris lp command, matching the IPP job priority values (
1-
100,
273 100 is highest priority) instead of the Solaris values (
0-
39,
0
274 is highest priority).
275 <h2 class=
"title"><a name=
"SEE_ALSO">See Also
</a></h2>
276 <a href='man-cancel.html?TOPIC=Man+Pages'
>cancel(
1)
</a>,
<a href='man-lpadmin.html?TOPIC=Man+Pages'
>lpadmin(
8)
</a>,
<a href='man-lpmove.html?TOPIC=Man+Pages'
>lpmove(
8)
</a>,
<a href='man-lpoptions.html?TOPIC=Man+Pages'
>lpoptions(
1)
</a>,
277 <a href='man-lpstat.html?TOPIC=Man+Pages'
>lpstat(
1)
</a>,
279 <a href='http://localhost:
631/help'
>http://localhost:
631/help
</a>
280 <h2 class=
"title"><a name=
"COPYRIGHT">Copyright
</a></h2>
281 Copyright
2007-
2013 by Apple Inc.