]> git.ipfire.org Git - thirdparty/cups.git/blob - man/lp.man
44972587135ae7ce7f59566473a60c3232232a70
[thirdparty/cups.git] / man / lp.man
1 .\"
2 .\" "$Id$"
3 .\"
4 .\" lp man page for CUPS.
5 .\"
6 .\" Copyright 2007-2014 by Apple Inc.
7 .\" Copyright 1997-2006 by Easy Software Products.
8 .\"
9 .\" These coded instructions, statements, and computer programs are the
10 .\" property of Apple Inc. and are protected by Federal copyright
11 .\" law. Distribution and use rights are outlined in the file "LICENSE.txt"
12 .\" which should have been included with this file. If this file is
13 .\" file is missing or damaged, see the license at "http://www.cups.org/".
14 .\"
15 .TH lp 1 "CUPS" "11 June 2014" "Apple Inc."
16 .SH NAME
17 lp \- print files
18 .SH SYNOPSIS
19 .B lp
20 [
21 .B \-E
22 ] [
23 .B \-U
24 .I username
25 ] [
26 .B \-c
27 ] [
28 \fB\-d \fIdestination\fR[\fB/\fIinstance\fR]
29 ] [
30 \fB\-h \fIhostname\fR[\fB:\fIport\fR]
31 ] [
32 .B \-m
33 ] [
34 .B \-n
35 .I num-copies
36 ] [
37 \fB\-o \fIoption\fR[\fB=\fIvalue\fR]
38 ] [
39 .B \-q
40 .I priority
41 ] [
42 .B \-s
43 ] [
44 .B \-t
45 .I title
46 ] [
47 .B \-H
48 .I handling
49 ] [
50 .B \-P
51 .I page-list
52 ] [
53 .B \-\-
54 ] [
55 .I file(s)
56 ]
57 .br
58 .B lp
59 [
60 .B \-E
61 ] [
62 .B \-U
63 .I username
64 ] [
65 .B \-c
66 ] [
67 \fB\-h \fIhostname\fR[\fB:\fIport\fR]
68 ] [
69 .B \-i
70 .I job-id
71 ] [
72 .B \-n
73 .I num-copies
74 ] [
75 \fB\-o \fIoption\fR[\fB=\fIvalue\fR]
76 ] [
77 .B \-q
78 .I priority
79 ] [
80 .B \-t
81 .I title
82 ] [
83 .B \-H
84 .I handling
85 ] [
86 .B \-P
87 .I page-list
88 ]
89 .SH DESCRIPTION
90 \fBlp\fR submits files for printing or alters a pending job.
91 Use a filename of "-" to force printing from the standard input.
92 .SS THE DEFAULT DESTINATION
93 CUPS provides many ways to set the default destination. The \fBLPDEST\fR and \fBPRINTER\fR environment variables are consulted first.
94 If neither are set, the current default set using the
95 .BR lpoptions (1)
96 command is used, followed by the default set using the
97 .BR lpadmin (8)
98 command.
99 .SH OPTIONS
100 The following options are recognized by \fIlp\fR:
101 .TP 5
102 .B \-\-
103 Marks the end of options; use this to print a file whose name begins with a dash (\-).
104 .TP 5
105 .B \-E
106 Forces encryption when connecting to the server.
107 .TP 5
108 \fB\-U \fIusername\fR
109 Specifies the username to use when connecting to the server.
110 .TP 5
111 .B \-c
112 This option is provided for backwards-compatibility only. On systems that support it, this option forces the print file to be copied to the spool directory before printing.
113 In CUPS, print files are always sent to the scheduler via IPP which has the same effect.
114 .TP 5
115 \fB\-d \fIdestination\fR
116 Prints files to the named printer.
117 .TP 5
118 \fB\-h \fIhostname\fR[\fB:\fIport\fR]
119 Chooses an alternate server.
120 .TP 5
121 \fB\-i \fIjob-id\fR
122 Specifies an existing job to modify.
123 .TP 5
124 .B \-m
125 Sends an email when the job is completed.
126 .TP 5
127 \fB\-n \fIcopies\fR
128 Sets the number of copies to print.
129 .TP 5
130 \fB\-o "\fIname\fB=\fIvalue \fR[ ... \fIname\fB=\fIvalue \fR]\fB"\fR
131 Sets one or more job options.
132 .TP 5
133 \fB\-q \fIpriority\fR
134 Sets the job priority from 1 (lowest) to 100 (highest).
135 The default priority is 50.
136 .TP 5
137 .B \-s
138 Do not report the resulting job IDs (silent mode.)
139 .TP 5
140 \fB\-t "\fIname\fB"\fR
141 Sets the job name.
142 .TP 5
143 \fB\-H \fIhh:mm\fR
144 .TP 5
145 \fB\-H hold\fR
146 .TP 5
147 \fB-H immediate\fR
148 .TP 5
149 \fB-H restart\fR
150 .TP 5
151 \fB-H resume\fR
152 Specifies when the job should be printed.
153 A value of \fIimmediate\fR will print the file immediately, a value of \fIhold\fR will hold the job indefinitely, and a UTC time value (HH:MM) will hold the job until the specified UTC (not local) time.
154 Use a value of \fIresume\fR with the \fI-i\fR option to resume a held job.
155 Use a value of \fIrestart\fR with the \fI-i\fR option to restart a completed job.
156 .TP 5
157 \fB\-P \fIpage-list\fR
158 Specifies which pages to print in the document.
159 The list can contain a list of numbers and ranges (#-#) separated by commas, e.g., "1,3-5,16".
160 The page numbers refer to the output pages and not the document's original pages - options like "number-up" can affect the numbering of the pages.
161 .SS COMMON JOB OPTIONS
162 Aside from the printer-specific options reported by the
163 .BR lpoptions (1)
164 command, the following generic options are available:
165 .TP 5
166 \fB\-o media=\fIsize\fR
167 Sets the page size to \fIsize\fR. Most printers support at least the size names "a4", "letter", and "legal".
168 .TP 5
169 \fB\-o orientation\-requested=4\fR
170 Prints the job in landscape (rotated 90 degrees).
171 .TP 5
172 \fB\-o sides=one\-sided\fR
173 Prints on one side of the paper.
174 .TP 5
175 \fB\-o sides=two\-sided\-long\-edge\fR
176 Prints on both sides of the paper for portrait output.
177 .TP 5
178 \fB\-o sides=two\-sided\-short\-edge\fR
179 Prints on both sides of the paper for landscape output.
180 .TP 5
181 \fB\-o fit\-to\-page\fR
182 Scales the print file to fit on the page.
183 .TP 5
184 \fB\-o number\-up=\fR{\fI2|4|6|9|16\fR}
185 Prints 2, 4, 6, 9, or 16 document (input) pages on each output page.
186 .SH CONFORMING TO
187 Unlike the System V printing system, CUPS allows printer names to contain any printable character except SPACE, TAB, "/", or "#".
188 Also, printer and class names are \fInot\fR case-sensitive.
189 .LP
190 The \fI-q\fR option accepts a different range of values than the Solaris lp command, matching the IPP job priority values (1-100, 100 is highest priority) instead of the Solaris values (0-39, 0 is highest priority).
191 .SH EXAMPLES
192 Print two copies of a document to the default printer:
193 .nf
194
195 lp -n 2 filename
196
197 .fi
198 Print a double-sided legal document to a printer called "foo":
199 .nf
200
201 lp -d foo -o media=legal -o sides=two-sided-long-edge filename
202
203 .fi
204 Print a presentation document 2-up to a printer called "foo":
205 .nf
206
207 lp -d foo -o number-up=2 filename
208 .fi
209 .SH SEE ALSO
210 .BR cancel (1),
211 .BR lpadmin (8),
212 .BR lpoptions (1),
213 .BR lpq (1),
214 .BR lpr (1),
215 .BR lprm (1),
216 .BR lpstat (1),
217 CUPS Online Help (http://localhost:631/help)
218 .SH COPYRIGHT
219 Copyright \[co] 2007-2015 by Apple Inc.
220 .\"
221 .\" End of "$Id$".
222 .\"