1lpr(1)                           OpenPrinting                           lpr(1)
2
3
4

NAME

6       lpr - print files
7

SYNOPSIS

9       lpr  [  -H server[:port] ] [ -E ] [ -U username ] [ -P destination[/in‐
10       stance] ] [ -# num-copies [ -h ] [ -l ] [ -m ] [ -o option[=value] ]  [
11       -p ] [ -q ] [ -r ] [ -C title ] [ -J title ] [ -T title ] [ file(s) ]
12

DESCRIPTION

14       lpr  submits  files  for printing.  Files named on the command line are
15       sent to the named printer or the default destination if no  destination
16       is  specified.   If  no files are listed on the command-line, lpr reads
17       the print file from the standard input.
18
19   THE DEFAULT DESTINATION
20       CUPS provides many ways to set the default destination. The LPDEST  and
21       PRINTER environment variables are consulted first.  If neither are set,
22       the current default set using the lpoptions(1) command  is  used,  fol‐
23       lowed by the default set using the lpadmin(8) command.
24

OPTIONS

26       The following options are recognized by lpr:
27
28       -E   Forces encryption when connecting to the server.
29
30       -H server[:port]
31            Specifies  an  alternate server.  Note: This option must occur be‐
32            fore all others.
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  op‐
64            tion  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 job-sheets=name
77            Prints a cover page (banner) with the document.  The "name" can be
78            "classified",  "confidential",  "secret", "standard", "topsecret",
79            or "unclassified".
80
81       -o media=size
82            Sets the page size to size. Most printers  support  at  least  the
83            size names "a4", "letter", and "legal".
84
85       -o number-up={2|4|6|9|16}
86            Prints  2,  4,  6,  9, or 16 document (input) pages on each output
87            page.
88
89       -o orientation-requested=4
90            Prints the job in landscape  (rotated  90  degrees  counter-clock‐
91            wise).
92
93       -o orientation-requested=5
94            Prints the job in landscape (rotated 90 degrees clockwise).
95
96       -o orientation-requested=6
97            Prints the job in reverse portrait (rotated 180 degrees).
98
99       -o print-quality=3
100
101       -o print-quality=4
102
103       -o print-quality=5
104            Specifies the output quality - draft (3), normal (4), or best (5).
105
106       -o sides=one-sided
107            Prints on one side of the paper.
108
109       -o sides=two-sided-long-edge
110            Prints on both sides of the paper for portrait output.
111
112       -o sides=two-sided-short-edge
113            Prints on both sides of the paper for landscape output.
114

NOTES

116       The -c, -d, -f, -g, -i, -n, -t, -v, and -w options are not supported by
117       CUPS and produce a warning message if used.
118

EXAMPLES

120       Print two copies of a document to the default printer:
121
122           lpr -# 2 filename
123
124       Print a double-sided legal document to a printer called "foo":
125
126           lpr -P foo -o media=legal -o sides=two-sided-long-edge filename
127
128       Print a presentation document 2-up to a printer called "foo":
129
130           lpr -P foo -o number-up=2 filename
131

SEE ALSO

133       cancel(1), lp(1), lpadmin(8), lpoptions(1), lpq(1), lprm(1), lpstat(1),
134       CUPS Online Help (http://localhost:631/help)
135
137       Copyright © 2021-2022 by OpenPrinting.
138
139
140
1412022-05-02                           CUPS                               lpr(1)
Impressum