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       -H hh:mm
76
77       -H hold
78
79       -H immediate
80
81       -H restart
82
83       -H resume
84            Specifies when the job should be printed.  A  value  of  immediate
85            will print the file immediately, a value of hold will hold the job
86            indefinitely, and a UTC time value (HH:MM) will hold the job until
87            the specified UTC (not local) time. Use a value of resume with the
88            -i option to resume a held job.  Use a value of restart  with  the
89            -i option to restart a completed job.
90
91       -P page-list
92            Specifies  which pages to print in the document. The list can con‐
93            tain a list of numbers and ranges (#-#) separated by commas  (e.g.
94            1,3-5,16).  The page numbers refer to the output pages and not the
95            document's original pages - options like  "number-up"  can  affect
96            the numbering of the pages.
97

COMMON JOB OPTIONS

99       Aside  from  the  printer-specific options reported by the lpoptions(1)
100       command, the following generic options are available:
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 landscape
107
108       -o orientation-requested=4
109            Prints the job in landscape (rotated 90 degrees).
110
111       -o sides=one-sided
112
113       -o sides=two-sided-long-edge
114
115       -o sides=two-sided-short-edge
116            Prints  on  one  or  two sides of the paper. The value "two-sided-
117            long-edge" is normally used  when  printing  portrait  (unrotated)
118            pages, while "two-sided-short-edge" is used for landscape pages.
119
120       -o fit-to-page
121            Scales the print file to fit on the page.
122
123       -o number-up=2
124
125       -o number-up=4
126
127       -o number-up=6
128
129       -o number-up=9
130
131       -o number-up=16
132            Prints multiple document pages on each output page.
133
134       -o cpi=N
135            Sets the number of characters per inch to use when printing a text
136            file. The default is 10.
137
138       -o lpi=N
139            Sets the number of lines per inch to  use  when  printing  a  text
140            file. The default is 6.
141
142       -o page-bottom=N
143
144       -o page-left=N
145
146       -o page-right=N
147
148       -o page-top=N
149            Sets  the page margins when printing text files. The values are in
150            points - there are 72 points to the inch.
151

EXAMPLES

153       Print a double-sided legal document to a printer called "foo":
154           lp -d foo -o media=legal -o sides=two-sided-long-edge filename
155
156       Print an image across 4 pages:
157           lp -d bar -o scaling=200 filename
158
159       Print a text file with 12 characters per inch, 8 lines per inch, and  a
160       1 inch left margin:
161           lp -d bar -o cpi=12 -o lpi=8 -o page-left=72 filename
162

COMPATIBILITY

164       Unlike  the System V printing system, CUPS allows printer names to con‐
165       tain any printable character except SPACE, TAB,  "/",  or  "#".   Also,
166       printer and class names are not case-sensitive.
167
168       The  "q" option accepts a different range of values than the Solaris lp
169       command, matching the IPP job priority values (1-100,  100  is  highest
170       priority) instead of the Solaris values (0-39, 0 is highest priority).
171

SEE ALSO

173       cancel(1), lpadmin(8), lpmove(8), lpoptions(1), lpstat(1),
174       http://localhost:631/help
175
177       Copyright 2007-2013 by Apple Inc.
178
179
180
18116 July 2012                         CUPS                                lp(1)
Impressum