1lpr(1) Apple Inc. lpr(1)
2
3
4
6 lpr - print files
7
9 lpr [ -E ] [ -H server[:port] ] [ -U username ] [ -P destina‐
10 tion[/instance] ] [ -# num-copies [ -h ] [ -l ] [ -m ] [ -o
11 option[=value] ] [ -p ] [ -q ] [ -r ] [ -C title ] [ -J title ] [ -T
12 title ] [ file(s) ]
13
15 lpr submits files for printing. Files named on the command line are
16 sent to the named printer or the default destination if no destination
17 is specified. If no files are listed on the command-line, lpr reads
18 the print file from the standard input.
19
20 THE DEFAULT DESTINATION
21 CUPS provides many ways to set the default destination. The LPDEST and
22 PRINTER environment variables are consulted first. If neither are set,
23 the current default set using the lpoptions(1) command is used, fol‐
24 lowed by the default set using the lpadmin(8) command.
25
27 The following options are recognized by lpr:
28
29 -E Forces encryption when connecting to the server.
30
31 -H server[:port]
32 Specifies an alternate server.
33
34 -C "name"
35
36 -J "name"
37
38 -T "name"
39 Sets the job name/title.
40
41 -P destination[/instance]
42 Prints files to the named printer.
43
44 -U username
45 Specifies an alternate username.
46
47 -# copies
48 Sets the number of copies to print.
49
50 -h Disables banner printing. This option is equivalent to -o
51 job-sheets=none.
52
53 -l Specifies that the print file is already formatted for the desti‐
54 nation and should be sent without filtering. This option is
55 equivalent to -o raw.
56
57 -m Send an email on job completion.
58
59 -o option[=value]
60 Sets a job option. See "COMMON JOB OPTIONS" below.
61
62 -p Specifies that the print file should be formatted with a shaded
63 header with the date, time, job name, and page number. This
64 option is equivalent to -o prettyprint and is only useful when
65 printing text files.
66
67 -q Hold job for printing.
68
69 -r Specifies that the named print files should be deleted after sub‐
70 mitting them.
71
72 COMMON JOB OPTIONS
73 Aside from the printer-specific options reported by the lpoptions(1)
74 command, the following generic options are available:
75
76 -o collate=true
77 Prints collated copies.
78
79 -o fit-to-page
80 Scales the print file to fit on the page.
81
82 -o job-hold-until=when
83 Holds the job until the specified local time. "when" can be
84 "indefinite" to hold the until released, "day-time" to print the
85 job between 6am and 6pm local time, "night" to print the job
86 between 6pm and 6am local time, "second-shift" to print the job
87 between 4pm and 12am local time, "third-shift" to print the job
88 between 12am and 8am local time, or "weekend" to print the job on
89 Saturday or Sunday.
90
91 -o job-hold-until=hh:mm
92 Holds the job until the specified time in hours and minutes UTC.
93
94 -o job-priority=priority
95 Set the priority to a value from 1 (lowest) to 100 (highest),
96 which influences when a job is scheduled for printing. The
97 default priority is typically 50.
98
99 -o job-sheets=name
100 Prints a cover page (banner) with the document. The "name" can be
101 "classified", "confidential", "secret", "standard", "topsecret",
102 or "unclassified".
103
104 -o job-sheets=start-name,end-name
105 Prints cover pages (banners) with the document.
106
107 -o media=size
108 Sets the page size to size. Most printers support at least the
109 size names "a4", "letter", and "legal".
110
111 -o mirror
112 Mirrors each page.
113
114 -o number-up={2|4|6|9|16}
115 Prints 2, 4, 6, 9, or 16 document (input) pages on each output
116 page.
117
118 -o number-up-layout=layout
119 Specifies the layout of pages with the "number-up" option. The
120 "layout" string can be "btlr", "btrl", "lrbt", "lrtb", "rlbt",
121 "rltb", "tblr", or "tbrl" - the first two letters determine the
122 column order while the second two letters determine the row order.
123 "bt" is bottom-to-top, "lr" is left-to-right, "rl" is right-to-
124 left, and "tb" is top-to-bottom.
125
126 -o orientation-requested=4
127 Prints the job in landscape (rotated 90 degrees counter-clock‐
128 wise).
129
130 -o orientation-requested=5
131 Prints the job in landscape (rotated 90 degrees clockwise).
132
133 -o orientation-requested=6
134 Prints the job in reverse portrait (rotated 180 degrees).
135
136 -o outputorder=reverse
137 Prints pages in reverse order.
138
139 -o page-border=border
140 Prints a border around each document page. "border" is "double",
141 "double-thick", "single", or "single-thick".
142
143 -o page-ranges=page-list
144 Specifies which pages to print in the document. The list can con‐
145 tain a list of numbers and ranges (#-#) separated by commas, e.g.,
146 "1,3-5,16". The page numbers refer to the output pages and not
147 the document's original pages - options like "number-up" can
148 affect the numbering of the pages.
149
150 -o sides=one-sided
151 Prints on one side of the paper.
152
153 -o sides=two-sided-long-edge
154 Prints on both sides of the paper for portrait output.
155
156 -o sides=two-sided-short-edge
157 Prints on both sides of the paper for landscape output.
158
160 The -c, -d, -f, -g, -i, -n, -t, -v, and -w options are not supported by
161 CUPS and produce a warning message if used.
162
164 Print two copies of a document to the default printer:
165
166 lpr -# 2 filename
167
168 Print a double-sided legal document to a printer called "foo":
169
170 lpr -P foo -o media=legal -o sides=two-sided-long-edge filename
171
172 Print a presentation document 2-up to a printer called "foo":
173
174 lpr -P foo -o number-up=2 filename
175
177 cancel(1), lp(1), lpadmin(8), lpoptions(1), lpq(1), lprm(1), lpstat(1),
178 CUPS Online Help (http://localhost:631/help)
179
181 Copyright © 2007-2017 by Apple Inc.
182
183
184
1852 May 2016 CUPS lpr(1)