1lp(1) Apple Inc. lp(1)
2
3
4
6 lp - print files
7
9 lp [ -E ] [ -U username ] [ -c ] [ -d destination[/instance] ] [ -h
10 hostname[:port] ] [ -m ] [ -n num-copies ] [ -o option[=value] ] [ -q
11 priority ] [ -s ] [ -t title ] [ -H handling ] [ -P page-list ] [ -- ]
12 [ file(s) ]
13 lp [ -E ] [ -U username ] [ -c ] [ -h hostname[:port] ] [ -i job-id ] [
14 -n num-copies ] [ -o option[=value] ] [ -q priority ] [ -t title ] [ -H
15 handling ] [ -P page-list ]
16
18 lp submits files for printing or alters a pending job. Use a filename
19 of "-" to force printing from the standard input.
20
22 CUPS provides many ways to set the default destination. The "LPDEST"
23 and "PRINTER" environment variables are consulted first. If neither are
24 set, the current default set using the lpoptions(1) command is used,
25 followed by the default set using the lpadmin(8) command.
26
28 The following options are recognized by lp:
29
30 --
31 Marks the end of options; use this to print a file whose name
32 begins with a dash (-).
33
34 -E
35 Forces encryption when connecting to the server.
36
37 -U username
38 Specifies the username to use when connecting to the server.
39
40 -c
41 This option is provided for backwards-compatibility only. On sys‐
42 tems that support it, this option forces the print file to be
43 copied to the spool directory before printing. In CUPS, print
44 files are always sent to the scheduler via IPP which has the same
45 effect.
46
47 -d destination
48 Prints files to the named printer.
49
50 -h hostname[:port]
51 Chooses an alternate server.
52
53 -i job-id
54 Specifies an existing job to modify.
55
56 -m
57 Sends an email when the job is completed.
58
59 -n copies
60 Sets the number of copies to print from 1 to 100.
61
62 -o "name=value [name=value ...]"
63 Sets one or more job options.
64
65 -q priority
66 Sets the job priority from 1 (lowest) to 100 (highest). The
67 default priority is 50.
68
69 -s
70 Do not report the resulting job IDs (silent mode.)
71
72 -t "name"
73 Sets the job name.
74
75 -u username
76 Submits jobs as username.
77
78 -H hh:mm
79
80 -H hold
81
82 -H immediate
83
84 -H restart
85
86 -H resume
87 Specifies when the job should be printed. A value of immediate
88 will print the file immediately, a value of hold will hold the job
89 indefinitely, and a UTC time value (HH:MM) will hold the job until
90 the specified UTC (not local) time. Use a value of resume with the
91 -i option to resume a held job. Use a value of restart with the
92 -i option to restart a completed job.
93
94 -P page-list
95 Specifies which pages to print in the document. The list can con‐
96 tain a list of numbers and ranges (#-#) separated by commas (e.g.
97 1,3-5,16). The page numbers refer to the output pages and not the
98 document's original pages - options like "number-up" can affect
99 the numbering of the pages.
100
102 Aside from the printer-specific options reported by the lpoptions(1)
103 command, the following generic options are available:
104
105 -o media=size
106 Sets the page size to size. Most printers support at least the
107 size names "a4", "letter", and "legal".
108
109 -o landscape
110
111 -o orientation-requested=4
112 Prints the job in landscape (rotated 90 degrees).
113
114 -o sides=one-sided
115
116 -o sides=two-sided-long-edge
117
118 -o sides=two-sided-short-edge
119 Prints on one or two sides of the paper. The value "two-sided-
120 long-edge" is normally used when printing portrait (unrotated)
121 pages, while "two-sided-short-edge" is used for landscape pages.
122
123 -o fitplot
124 Scales the print file to fit on the page.
125
126 -o number-up=2
127
128 -o number-up=4
129
130 -o number-up=6
131
132 -o number-up=9
133
134 -o number-up=16
135 Prints multiple document pages on each output page.
136
137 -o scaling=number
138 Scales image files to use up to number percent of the page. Val‐
139 ues greater than 100 cause the image file to be printed across
140 multiple pages.
141
142 -o cpi=N
143 Sets the number of characters per inch to use when printing a text
144 file. The default is 10.
145
146 -o lpi=N
147 Sets the number of lines per inch to use when printing a text
148 file. The default is 6.
149
150 -o page-bottom=N
151
152 -o page-left=N
153
154 -o page-right=N
155
156 -o page-top=N
157 Sets the page margins when printing text files. The values are in
158 points - there are 72 points to the inch.
159
161 Print a double-sided legal document to a printer called "foo":
162 lp -d foo -o media=legal -o sides=two-sided-long-edge filename
163
164 Print an image across 4 pages:
165 lp -d bar -o scaling=200 filename
166
167 Print a text file with 12 characters per inch, 8 lines per inch, and a
168 1 inch left margin:
169 lp -d bar -o cpi=12 -o lpi=8 -o page-left=72 filename
170
172 Unlike the System V printing system, CUPS allows printer names to con‐
173 tain any printable character except SPACE, TAB, "/", or "#". Also,
174 printer and class names are not case-sensitive.
175
176 The "q" option accepts a different range of values than the Solaris lp
177 command, matching the IPP job priority values (1-100, 100 is highest
178 priority) instead of the Solaris values (0-39, 0 is highest priority).
179
181 cancel(1), lpadmin(8), lpmove(8), lpoptions(1), lpstat(1),
182 http://localhost:631/help
183
185 Copyright 2007-2011 by Apple Inc.
186
187
188
18931 March 2011 CUPS lp(1)