1lp(1)                             Apple Inc.                             lp(1)
2
3
4

NAME

6       lp - print files
7

SYNOPSIS

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

DESCRIPTION

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

OPTIONS

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 collate=true
98            Prints collated copies.
99
100       -o fit-to-page
101            Scales the print file to fit on the page.
102
103       -o job-hold-until=when
104            Holds the job until the  specified  local  time.   "when"  can  be
105            "indefinite"  to  hold the until released, "day-time" to print the
106            job between 6am and 6pm local  time,  "night"  to  print  the  job
107            between  6pm  and  6am local time, "second-shift" to print the job
108            between 4pm and 12am local time, "third-shift" to  print  the  job
109            between  12am and 8am local time, or "weekend" to print the job on
110            Saturday or Sunday.
111
112       -o job-hold-until=hh:mm
113            Holds the job until the specified time in hours and minutes UTC.
114
115       -o job-priority=priority
116            Set the priority to a value from  1  (lowest)  to  100  (highest),
117            which  influences  when  a  job  is  scheduled  for printing.  The
118            default priority is typically 50.
119
120       -o job-sheets=name
121            Prints a cover page (banner) with the document.  The "name" can be
122            "classified",  "confidential",  "secret", "standard", "topsecret",
123            or "unclassified".
124
125       -o job-sheets=start-name,end-name
126            Prints cover pages (banners) with the document.
127
128       -o media=size
129            Sets the page size to size. Most printers  support  at  least  the
130            size names "a4", "letter", and "legal".
131
132       -o mirror
133            Mirrors each page.
134
135       -o number-up={2|4|6|9|16}
136            Prints  2,  4,  6,  9, or 16 document (input) pages on each output
137            page.
138
139       -o number-up-layout=layout
140            Specifies the layout of pages with the  "number-up"  option.   The
141            "layout"  string  can  be  "btlr", "btrl", "lrbt", "lrtb", "rlbt",
142            "rltb", "tblr", or "tbrl" - the first two  letters  determine  the
143            column order while the second two letters determine the row order.
144            "bt" is bottom-to-top, "lr" is left-to-right,  "rl"  is  right-to-
145            left, and "tb" is top-to-bottom.
146
147       -o orientation-requested=4
148            Prints  the  job  in  landscape (rotated 90 degrees counter-clock‐
149            wise).
150
151       -o orientation-requested=5
152            Prints the job in landscape (rotated 90 degrees clockwise).
153
154       -o orientation-requested=6
155            Prints the job in reverse portrait (rotated 180 degrees).
156
157       -o outputorder=reverse
158            Prints pages in reverse order.
159
160       -o page-border=border
161            Prints a border around each document page.  "border" is  "double",
162            "double-thick", "single", or "single-thick".
163
164       -o page-ranges=page-list
165            Specifies which pages to print in the document.  The list can con‐
166            tain a list of numbers and ranges (#-#) separated by commas, e.g.,
167            "1,3-5,16".   The  page  numbers refer to the output pages and not
168            the document's original  pages  -  options  like  "number-up"  can
169            affect the numbering of the pages.
170
171       -o sides=one-sided
172            Prints on one side of the paper.
173
174       -o sides=two-sided-long-edge
175            Prints on both sides of the paper for portrait output.
176
177       -o sides=two-sided-short-edge
178            Prints on both sides of the paper for landscape output.
179

CONFORMING TO

181       Unlike  the System V printing system, CUPS allows printer names to con‐
182       tain any printable character except SPACE, TAB,  "/",  or  "#".   Also,
183       printer and class names are not case-sensitive.
184
185       The  -q  option accepts a different range of values than the Solaris lp
186       command, matching the IPP job priority values (1-100,  100  is  highest
187       priority) instead of the Solaris values (0-39, 0 is highest priority).
188

EXAMPLES

190       Print two copies of a document to the default printer:
191
192           lp -n 2 filename
193
194       Print a double-sided legal document to a printer called "foo":
195
196           lp -d foo -o media=legal -o sides=two-sided-long-edge filename
197
198       Print a presentation document 2-up to a printer called "foo":
199
200           lp -d foo -o number-up=2 filename
201

SEE ALSO

203       cancel(1),   lpadmin(8),   lpoptions(1),   lpq(1),   lpr(1),   lprm(1),
204       lpstat(1), CUPS Online Help (http://localhost:631/help)
205
207       Copyright © 2007-2017 by Apple Inc.
208
209
210
2112 May 2016                           CUPS                                lp(1)
Impressum