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
21 THE DEFAULT DESTINATION
22 CUPS provides many ways to set the default destination. The LPDEST and
23 PRINTER environment variables are consulted first. If neither are set,
24 the current default set using the lpoptions(1) command is used, fol‐
25 lowed by the default set using the lpadmin(8) command.
26
28 The following options are recognized by lp:
29
30 -- Marks the end of options; use this to print a file whose name
31 begins with a dash (-).
32
33 -E Forces encryption when connecting to the server.
34
35 -U username
36 Specifies the username to use when connecting to the server.
37
38 -c This option is provided for backwards-compatibility only. On sys‐
39 tems that support it, this option forces the print file to be
40 copied to the spool directory before printing. In CUPS, print
41 files are always sent to the scheduler via IPP which has the same
42 effect.
43
44 -d destination
45 Prints files to the named printer.
46
47 -h hostname[:port]
48 Chooses an alternate server.
49
50 -i job-id
51 Specifies an existing job to modify.
52
53 -m Sends an email when the job is completed.
54
55 -n copies
56 Sets the number of copies to print.
57
58 -o "name=value [ ... name=value ]"
59 Sets one or more job options. See "COMMON JOB OPTIONS" below.
60
61 -q priority
62 Sets the job priority from 1 (lowest) to 100 (highest). The
63 default priority is 50.
64
65 -s Do not report the resulting job IDs (silent mode.)
66
67 -t "name"
68 Sets the job name.
69
70 -H hh:mm
71
72 -H hold
73
74 -H immediate
75
76 -H restart
77
78 -H resume
79 Specifies when the job should be printed. A value of immediate
80 will print the file immediately, a value of hold will hold the job
81 indefinitely, and a UTC time value (HH:MM) will hold the job until
82 the specified UTC (not local) time. Use a value of resume with
83 the -i option to resume a held job. Use a value of restart with
84 the -i option to restart a completed job.
85
86 -P page-list
87 Specifies which pages to print in the document. The list can con‐
88 tain a list of numbers and ranges (#-#) separated by commas, e.g.,
89 "1,3-5,16". The page numbers refer to the output pages and not
90 the document's original pages - options like "number-up" can
91 affect the numbering of the pages.
92
93 COMMON JOB OPTIONS
94 Aside from the printer-specific options reported by the lpoptions(1)
95 command, the following generic options are available:
96
97 -o job-sheets=name
98 Prints a cover page (banner) with the document. The "name" can be
99 "classified", "confidential", "secret", "standard", "topsecret",
100 or "unclassified".
101
102 -o media=size
103 Sets the page size to size. Most printers support at least the
104 size names "a4", "letter", and "legal".
105
106 -o number-up={2|4|6|9|16}
107 Prints 2, 4, 6, 9, or 16 document (input) pages on each output
108 page.
109
110 -o orientation-requested=4
111 Prints the job in landscape (rotated 90 degrees counter-clock‐
112 wise).
113
114 -o orientation-requested=5
115 Prints the job in landscape (rotated 90 degrees clockwise).
116
117 -o orientation-requested=6
118 Prints the job in reverse portrait (rotated 180 degrees).
119
120 -o print-quality=3
121
122 -o print-quality=4
123
124 -o print-quality=5
125 Specifies the output quality - draft (3), normal (4), or best (5).
126
127 -o sides=one-sided
128 Prints on one side of the paper.
129
130 -o sides=two-sided-long-edge
131 Prints on both sides of the paper for portrait output.
132
133 -o sides=two-sided-short-edge
134 Prints on both sides of the paper for landscape output.
135
137 Unlike the System V printing system, CUPS allows printer names to con‐
138 tain any printable character except SPACE, TAB, "/", or "#". Also,
139 printer and class names are not case-sensitive.
140
141 The -q option accepts a different range of values than the Solaris lp
142 command, matching the IPP job priority values (1-100, 100 is highest
143 priority) instead of the Solaris values (0-39, 0 is highest priority).
144
146 Print two copies of a document to the default printer:
147
148 lp -n 2 filename
149
150 Print a double-sided legal document to a printer called "foo":
151
152 lp -d foo -o media=legal -o sides=two-sided-long-edge filename
153
154 Print a presentation document 2-up to a printer called "bar":
155
156 lp -d bar -o number-up=2 filename
157
159 cancel(1), lpadmin(8), lpoptions(1), lpq(1), lpr(1), lprm(1),
160 lpstat(1), CUPS Online Help (http://localhost:631/help)
161
163 Copyright © 2007-2019 by Apple Inc.
164
165
166
16726 April 2019 CUPS lp(1)