]> git.ipfire.org Git - thirdparty/cups.git/blob - man/lpr.man
License change: Apache License, Version 2.0.
[thirdparty/cups.git] / man / lpr.man
1 .\"
2 .\" lpr man page for CUPS.
3 .\"
4 .\" Copyright 2007-2016 by Apple Inc.
5 .\" Copyright 1997-2006 by Easy Software Products.
6 .\"
7 .\" Licensed under Apache License v2.0. See the file "LICENSE" for more information.
8 .\"
9 .TH lpr 1 "CUPS" "2 May 2016" "Apple Inc."
10 .SH NAME
11 lpr \- print files
12 .SH SYNOPSIS
13 .B lpr
14 [
15 .B \-E
16 ] [
17 \fB\-H \fIserver\fR[\fB:\fIport\fR]
18 ] [
19 .B \-U
20 .I username
21 ] [
22 \fB\-P \fIdestination\fR[\fB/\fIinstance\fR]
23 ] [
24 .B \-#
25 .I num-copies
26 [
27 .B \-h
28 ] [
29 .B \-l
30 ] [
31 .B \-m
32 ] [
33 \fB\-o \fIoption\fR[\fB=\fIvalue\fR]
34 ] [
35 .B \-p
36 ] [
37 .B \-q
38 ] [
39 .B \-r
40 ] [
41 .B \-C
42 .I title
43 ] [
44 .B \-J
45 .I title
46 ] [
47 .B \-T
48 .I title
49 ] [
50 .I file(s)
51 ]
52 .SH DESCRIPTION
53 \fBlpr\fR submits files for printing.
54 Files named on the command line are sent to the named printer or the default destination if no destination is specified.
55 If no files are listed on the command-line, \fBlpr\fR reads the print file from the standard input.
56 .SS THE DEFAULT DESTINATION
57 CUPS provides many ways to set the default destination. The \fBLPDEST\fR and \fBPRINTER\fR environment variables are consulted first.
58 If neither are set, the current default set using the
59 .BR lpoptions (1)
60 command is used, followed by the default set using the
61 .BR lpadmin (8)
62 command.
63 .SH OPTIONS
64 The following options are recognized by \fIlpr\fR:
65 .TP 5
66 .B \-E
67 Forces encryption when connecting to the server.
68 .TP 5
69 \fB\-H \fIserver\fR[\fB:\fIport\fR]
70 Specifies an alternate server.
71 .TP 5
72 \fB\-C "\fIname\fB"\fR
73 .TP 5
74 \fB\-J "\fIname\fB"\fR
75 .TP 5
76 \fB\-T "\fIname\fB"\fR
77 Sets the job name/title.
78 .TP 5
79 \fB\-P \fIdestination\fR[\fB/\fIinstance\fR]
80 Prints files to the named printer.
81 .TP 5
82 \fB\-U \fIusername\fR
83 Specifies an alternate username.
84 .TP 5
85 \fB\-# \fIcopies\fR
86 Sets the number of copies to print.
87 .TP 5
88 .B \-h
89 Disables banner printing. This option is equivalent to \fI-o job\-sheets=none\fR.
90 .TP 5
91 .B \-l
92 Specifies that the print file is already formatted for the destination and should be sent without filtering.
93 This option is equivalent to \fI-o raw\fR.
94 .TP 5
95 .B \-m
96 Send an email on job completion.
97 .TP 5
98 \fB\-o \fIoption\fR[\fB=\fIvalue\fR]
99 Sets a job option.
100 See "COMMON JOB OPTIONS" below.
101 .TP 5
102 .B \-p
103 Specifies that the print file should be formatted with a shaded header with the date, time, job name, and page number.
104 This option is equivalent to \fI\-o prettyprint\fR and is only useful when printing text files.
105 .TP 5
106 .B \-q
107 Hold job for printing.
108 .TP 5
109 .B \-r
110 Specifies that the named print files should be deleted after submitting them.
111 .SS COMMON JOB OPTIONS
112 Aside from the printer-specific options reported by the
113 .BR lpoptions (1)
114 command, the following generic options are available:
115 .TP 5
116 \fB\-o collate=true\fR
117 Prints collated copies.
118 .TP 5
119 \fB\-o fit\-to\-page\fR
120 Scales the print file to fit on the page.
121 .TP 5
122 \fB\-o job-hold-until=\fIwhen\fR
123 Holds the job until the specified local time.
124 "when" can be "indefinite" to hold the until released, "day-time" to print the job between 6am and 6pm local time, "night" to print the job between 6pm and 6am local time, "second-shift" to print the job between 4pm and 12am local time, "third-shift" to print the job between 12am and 8am local time, or "weekend" to print the job on Saturday or Sunday.
125 .TP 5
126 \fB\-o job-hold-until=\fIhh:mm\fR
127 Holds the job until the specified time in hours and minutes UTC.
128 .TP 5
129 \fB\-o job-priority=\fIpriority\fR
130 Set the priority to a value from 1 (lowest) to 100 (highest), which influences when a job is scheduled for printing.
131 The default priority is typically 50.
132 .TP 5
133 \fB\-o job-sheets=\fIname\fR\fR
134 Prints a cover page (banner) with the document.
135 The "name" can be "classified", "confidential", "secret", "standard", "topsecret", or "unclassified".
136 .TP 5
137 \fB\-o job-sheets=\fIstart-name,end-name\fR\fR
138 Prints cover pages (banners) with the document.
139 .TP 5
140 \fB\-o media=\fIsize\fR
141 Sets the page size to \fIsize\fR. Most printers support at least the size names "a4", "letter", and "legal".
142 .TP 5
143 \fB\-o mirror\fR
144 Mirrors each page.
145 .TP 5
146 \fB\-o number\-up=\fR{\fI2|4|6|9|16\fR}
147 Prints 2, 4, 6, 9, or 16 document (input) pages on each output page.
148 .TP 5
149 \fB\-o number\-up\-layout=\fIlayout\fR
150 Specifies the layout of pages with the "number-up" option.
151 The "layout" string can be "btlr", "btrl", "lrbt", "lrtb", "rlbt", "rltb", "tblr", or "tbrl" - the first two letters determine the column order while the second two letters determine the row order.
152 "bt" is bottom-to-top, "lr" is left-to-right, "rl" is right-to-left, and "tb" is top-to-bottom.
153 .TP 5
154 \fB\-o orientation\-requested=4\fR
155 Prints the job in landscape (rotated 90 degrees counter-clockwise).
156 .TP 5
157 \fB\-o orientation\-requested=5\fR
158 Prints the job in landscape (rotated 90 degrees clockwise).
159 .TP 5
160 \fB\-o orientation\-requested=6\fR
161 Prints the job in reverse portrait (rotated 180 degrees).
162 .TP 5
163 \fB\-o outputorder=reverse\fR
164 Prints pages in reverse order.
165 .TP 5
166 \fB\-o page\-border=\fIborder\fR
167 Prints a border around each document page.
168 "border" is "double", "double\-thick", "single", or "single\-thick".
169 .TP 5
170 \fB\-o page\-ranges=\fIpage-list\fR
171 Specifies which pages to print in the document.
172 The list can contain a list of numbers and ranges (#-#) separated by commas, e.g., "1,3-5,16".
173 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.
174 .TP 5
175 \fB\-o sides=one\-sided\fR
176 Prints on one side of the paper.
177 .TP 5
178 \fB\-o sides=two\-sided\-long\-edge\fR
179 Prints on both sides of the paper for portrait output.
180 .TP 5
181 \fB\-o sides=two\-sided\-short\-edge\fR
182 Prints on both sides of the paper for landscape output.
183 .SH NOTES
184 The \fI\-c\fR, \fI\-d\fR, \fI\-f\fR, \fI\-g\fR, \fI\-i\fR, \fI\-n\fR, \fI\-t\fR, \fI\-v\fR, and \fI\-w\fR options are not supported by CUPS and produce a warning message if used.
185 .SH EXAMPLES
186 Print two copies of a document to the default printer:
187 .nf
188
189 lpr -# 2 filename
190
191 .fi
192 Print a double-sided legal document to a printer called "foo":
193 .nf
194
195 lpr -P foo -o media=legal -o sides=two-sided-long-edge filename
196
197 .fi
198 Print a presentation document 2-up to a printer called "foo":
199 .nf
200
201 lpr -P foo -o number-up=2 filename
202 .fi
203 .SH SEE ALSO
204 .BR cancel (1),
205 .BR lp (1),
206 .BR lpadmin (8),
207 .BR lpoptions (1),
208 .BR lpq (1),
209 .BR lprm (1),
210 .BR lpstat (1),
211 CUPS Online Help (http://localhost:631/help)
212 .SH COPYRIGHT
213 Copyright \[co] 2007-2017 by Apple Inc.