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]
</i>
19 <i>hostname[:port]
</i>
40 <i>hostname[:port]
</i>
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>:
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 (-).
72 <dd style=
"margin-left: 5.0em"><br>
73 Forces encryption when connecting to the server.
75 <dd style=
"margin-left: 5.0em"><br>
76 Specifies the username to use when connecting to the server.
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
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.
91 <dd style=
"margin-left: 5.0em"><br>
92 Specifies an existing job to modify.
94 <dd style=
"margin-left: 5.0em"><br>
95 Sends an email when the job is completed.
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.
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.
107 <dd style=
"margin-left: 5.0em"><br>
108 Do not report the resulting job IDs (silent mode.)
110 <dd style=
"margin-left: 5.0em"><br>
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
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.
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
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".
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
154 <dd style=
"margin-left: 5.0em"><br>
155 Scales the print file to fit on the page.
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.
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.
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.
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.
179 <h2 class=
"title"><a name=
"EXAMPLES">Examples
</a></h2>
180 Print a double-sided legal document to a printer called
"foo":
182 lp -d foo -o media=legal -o sides=two-sided-long-edge filename
184 <p>Print an image across
4 pages:
186 lp -d bar -o scaling=
200 filename
188 <p>Print a text file with
12 characters per inch,
8 lines per inch, and
189 a
1 inch left margin:
191 lp -d bar -o cpi=
12 -o lpi=
8 -o page-left=
72 filename
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>,
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.