]>
Commit | Line | Data |
---|---|---|
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> | |
11 | lp - 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 | |
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, | |
c277f98c MS |
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. | |
94436c5a MS |
64 | <h2 class="title"><a name="OPTIONS">Options</a></h2> |
65 | The 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> | |
69 | Marks the end of options; use this to print a file whose name | |
94436c5a | 70 | begins with a dash (-). |
c277f98c MS |
71 | <p style="margin-left: 5.0em; text-indent: -5.0em">-E |
72 | <br> | |
73 | <br> | |
74 | Forces encryption when connecting to the server. | |
75 | <p style="margin-left: 5.0em; text-indent: -5.0em">-U username | |
76 | <br> | |
77 | <br> | |
78 | Specifies 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> | |
82 | This option is provided for backwards-compatibility only. On | |
94436c5a MS |
83 | systems that support it, this option forces the print file to be |
84 | copied to the spool directory before printing. In CUPS, print | |
85 | files are always sent to the scheduler via IPP which has the | |
86 | same effect. | |
c277f98c MS |
87 | <p style="margin-left: 5.0em; text-indent: -5.0em">-d destination |
88 | <br> | |
89 | <br> | |
90 | Prints files to the named printer. | |
91 | <p style="margin-left: 5.0em; text-indent: -5.0em">-h hostname[:port] | |
92 | <br> | |
93 | <br> | |
94 | Chooses an alternate server. | |
95 | <p style="margin-left: 5.0em; text-indent: -5.0em">-i job-id | |
96 | <br> | |
97 | <br> | |
98 | Specifies an existing job to modify. | |
99 | <p style="margin-left: 5.0em; text-indent: -5.0em">-m | |
100 | <br> | |
101 | <br> | |
102 | Sends an email when the job is completed. | |
103 | <p style="margin-left: 5.0em; text-indent: -5.0em">-n copies | |
104 | <br> | |
105 | <br> | |
106 | Sets 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> | |
110 | Sets one or more job options. | |
111 | <p style="margin-left: 5.0em; text-indent: -5.0em">-q priority | |
112 | <br> | |
113 | <br> | |
114 | Sets the job priority from 1 (lowest) to 100 (highest). The | |
94436c5a | 115 | default priority is 50. |
c277f98c MS |
116 | <p style="margin-left: 5.0em; text-indent: -5.0em">-s |
117 | <br> | |
118 | <br> | |
119 | Do 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> | |
123 | Sets 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> | |
135 | Specifies when the job should be printed. A value of <i>immediate</i> will print | |
94436c5a MS |
136 | the file immediately, a value of <i>hold</i> will hold the job indefinitely, and |
137 | a UTC time value (HH:MM) will hold the job until the specified UTC (not local) | |
138 | time. Use a value of <i>resume</i> with the <i>-i</i> option to resume a held job. | |
139 | Use a value of <i>restart</i> with the <i>-i</i> option to restart | |
140 | a completed job. | |
c277f98c MS |
141 | <p style="margin-left: 5.0em; text-indent: -5.0em">-P page-list |
142 | <br> | |
143 | <br> | |
144 | Specifies which pages to print in the document. The list can | |
94436c5a MS |
145 | contain 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 | |
147 | not the document's original pages - options like "number-up" can | |
148 | affect the numbering of the pages. | |
94436c5a MS |
149 | <h2 class="title"><a name="COMMON_JOB_OPTIONS">Common Job Options</a></h2> |
150 | Aside from the printer-specific options reported by the | |
c277f98c | 151 | <i>lpoptions(1)</i> command, the following generic options are |
94436c5a | 152 | available: |
c277f98c MS |
153 | <p style="margin-left: 5.0em; text-indent: -5.0em">-o media=size |
154 | <br> | |
155 | <br> | |
156 | Sets the page size to <i>size</i>. Most printers support at least | |
94436c5a | 157 | the 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> | |
163 | Prints 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> | |
171 | Prints 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 | |
174 | landscape pages. | |
c277f98c MS |
175 | <p style="margin-left: 5.0em; text-indent: -5.0em">-o fit-to-page |
176 | <br> | |
177 | <br> | |
178 | Scales 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> | |
190 | Prints 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> | |
194 | Sets the number of characters per inch to use when printing a | |
94436c5a | 195 | text 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> | |
199 | Sets the number of lines per inch to use when printing a text | |
94436c5a | 200 | file. 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> | |
210 | Sets the page margins when printing text files. The values are in | |
94436c5a | 211 | points - there are 72 points to the inch. |
94436c5a MS |
212 | <h2 class="title"><a name="EXAMPLES">Examples</a></h2> |
213 | Print 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 | |
222 | a 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> | |
227 | Unlike the System V printing system, CUPS allows printer names to | |
228 | contain any printable character except SPACE, TAB, "/", or "#". | |
229 | Also, printer and class names are <i>not</i> case-sensitive. | |
230 | <p>The "q" option accepts a different range of values than the | |
231 | Solaris lp command, matching the IPP job priority values (1-100, | |
232 | 100 is highest priority) instead of the Solaris values (0-39, 0 | |
233 | is 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> |
240 | Copyright 2007-2013 by Apple Inc. | |
241 | ||
242 | </body> | |
243 | </html> |