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

THE DEFAULT DESTINATION

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

OPTIONS

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 time value (HH:MM) will hold the job until the
90            specified time. Use a value of resume with the -i option to resume
91            a held job.  Use a value of restart with the -i option to  restart
92            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.  that are
100

COMMON JOB OPTIONS

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). Option '-o ori‐
113            entation-requested=6' (rotated 180 degrees) does not work.
114
115       -o sides=one-sided
116
117       -o sides=two-sided-long-edge
118
119       -o sides=two-sided-short-edge
120            Prints on one or two sides of the  paper.  The  value  "two-sided-
121            long-edge"  is  normally  used  when printing portrait (unrotated)
122            pages, while "two-sided-short-edge" is used for landscape pages.
123
124       -o fitplot
125            Scales the print file to fit on the page.  This  option  does  not
126            work for printers with HW margins.
127
128       -o number-up=2
129
130       -o number-up=4
131
132       -o number-up=6
133
134       -o number-up=9
135
136       -o number-up=16
137            Prints multiple document pages on each output page.
138
139       -o scaling=number
140            Scales  image files to use up to number percent of the page.  Val‐
141            ues greater than 100 cause the image file  to  be  printed  across
142            multiple pages.
143
144       -o cpi=N
145            Sets the number of characters per inch to use when printing a text
146            file. The default is 10.
147
148       -o lpi=N
149            Sets the number of lines per inch to  use  when  printing  a  text
150            file. The default is 6.
151
152       -o page-bottom=N
153
154       -o page-left=N
155
156       -o page-right=N
157
158       -o page-top=N
159            Sets  the page margins when printing text files. The values are in
160            points - there are 72 points to the inch.
161

EXAMPLES

163       Print a double-sided legal document to a printer called "foo":
164           lp -d foo -o media=legal -o sides=two-sided-long-edge filename
165
166       Print an image across 4 pages:
167           lp -d bar -o scaling=200 filename
168
169       Print a text file with 12 characters per inch, 8 lines per inch, and  a
170       1 inch left margin:
171           lp -d bar -o cpi=12 -o lpi=8 -o page-left=72 filename
172

COMPATIBILITY

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

SEE ALSO

183       cancel(1), lpadmin(8), lpmove(8), lpoptions(1), lpstat(1),
184       http://localhost:631/help
185
187       Copyright 2007-2009 by Apple Inc.
188
189
190
19117 November 2008                     CUPS                                lp(1)
Impressum