2020-04-11 09:13:16 +01:00
|
|
|
|
# lpr
|
|
|
|
|
|
2024-02-25 10:46:24 +00:00
|
|
|
|
> Print files.
|
lpr: fix -o sides example (#8170)
* lpr: updated
`lpr --help` yields:
`Usage: lpr [options] [file(s)]
Options:
-# num-copies Specify the number of copies to print
-E Encrypt the connection to the server
-H server[:port] Connect to the named server and port
-m Send an email notification when the job completes
-o option[=value] Specify a printer-specific option
-o job-sheets=standard Print a banner page with the job
-o media=size Specify the media size to use
-o number-up=N Specify that input pages should be printed N-up (1, 2, 4, 6, 9, and 16 are supported)
-o orientation-requested=N
Specify portrait (3) or landscape (4) orientation
-o print-quality=N Specify the print quality - draft (3), normal (4), or best (5)
-o sides=one-sided Specify 1-sided printing
-o sides=two-sided-long-edge
Specify 2-sided portrait printing
-o sides=two-sided-short-edge
Specify 2-sided landscape printing
-P destination Specify the destination
-q Specify the job should be held for printing
-r Remove the file(s) after submission
-T title Specify the job title
-U username Specify the username to use for authentication`
Here, it says that that in stead of underscores at two_sided_long_edge, it should have dashes, two-sided-long-edge. Without these, the command is essentially useless.
* Update lpr.md
* Update pages/common/lpr.md
Co-authored-by: Emily Grace Seville <emilyseville7cf@gmail.com>
* Update pages/common/lpr.md
Co-authored-by: CleanMachine1 <78213164+CleanMachine1@users.noreply.github.com>
Co-authored-by: Emily Grace Seville <emilyseville7cf@gmail.com>
Co-authored-by: marchersimon <50295997+marchersimon@users.noreply.github.com>
Co-authored-by: CleanMachine1 <78213164+CleanMachine1@users.noreply.github.com>
2022-07-15 16:05:51 +01:00
|
|
|
|
> See also: `lpstat` and `lpadmin`.
|
2023-12-28 15:33:50 +00:00
|
|
|
|
> More information: <https://openprinting.github.io/cups/doc/man-lpr.html>.
|
2020-04-11 09:13:16 +01:00
|
|
|
|
|
|
|
|
|
- Print a file to the default printer:
|
|
|
|
|
|
|
|
|
|
`lpr {{path/to/file}}`
|
|
|
|
|
|
|
|
|
|
- Print 2 copies:
|
|
|
|
|
|
|
|
|
|
`lpr -# {{2}} {{path/to/file}}`
|
|
|
|
|
|
|
|
|
|
- Print to a named printer:
|
|
|
|
|
|
|
|
|
|
`lpr -P {{printer}} {{path/to/file}}`
|
|
|
|
|
|
2020-11-27 01:06:38 +00:00
|
|
|
|
- Print either a single page (e.g. 2) or a range of pages (e.g. 2–16):
|
2020-04-11 09:13:16 +01:00
|
|
|
|
|
2020-11-27 01:06:38 +00:00
|
|
|
|
`lpr -o page-ranges={{2|2-16}} {{path/to/file}}`
|
2020-04-11 09:13:16 +01:00
|
|
|
|
|
2021-08-15 18:59:09 +01:00
|
|
|
|
- Print double-sided either in portrait (long) or in landscape (short):
|
2020-04-11 09:13:16 +01:00
|
|
|
|
|
lpr: fix -o sides example (#8170)
* lpr: updated
`lpr --help` yields:
`Usage: lpr [options] [file(s)]
Options:
-# num-copies Specify the number of copies to print
-E Encrypt the connection to the server
-H server[:port] Connect to the named server and port
-m Send an email notification when the job completes
-o option[=value] Specify a printer-specific option
-o job-sheets=standard Print a banner page with the job
-o media=size Specify the media size to use
-o number-up=N Specify that input pages should be printed N-up (1, 2, 4, 6, 9, and 16 are supported)
-o orientation-requested=N
Specify portrait (3) or landscape (4) orientation
-o print-quality=N Specify the print quality - draft (3), normal (4), or best (5)
-o sides=one-sided Specify 1-sided printing
-o sides=two-sided-long-edge
Specify 2-sided portrait printing
-o sides=two-sided-short-edge
Specify 2-sided landscape printing
-P destination Specify the destination
-q Specify the job should be held for printing
-r Remove the file(s) after submission
-T title Specify the job title
-U username Specify the username to use for authentication`
Here, it says that that in stead of underscores at two_sided_long_edge, it should have dashes, two-sided-long-edge. Without these, the command is essentially useless.
* Update lpr.md
* Update pages/common/lpr.md
Co-authored-by: Emily Grace Seville <emilyseville7cf@gmail.com>
* Update pages/common/lpr.md
Co-authored-by: CleanMachine1 <78213164+CleanMachine1@users.noreply.github.com>
Co-authored-by: Emily Grace Seville <emilyseville7cf@gmail.com>
Co-authored-by: marchersimon <50295997+marchersimon@users.noreply.github.com>
Co-authored-by: CleanMachine1 <78213164+CleanMachine1@users.noreply.github.com>
2022-07-15 16:05:51 +01:00
|
|
|
|
`lpr -o sides={{two-sided-long-edge|two-sided-short-edge}} {{path/to/file}}`
|
2020-04-11 09:13:16 +01:00
|
|
|
|
|
|
|
|
|
- Set page size (more options may be available depending on setup):
|
|
|
|
|
|
|
|
|
|
`lpr -o media={{a4|letter|legal}} {{path/to/file}}`
|
|
|
|
|
|
|
|
|
|
- Print multiple pages per sheet:
|
|
|
|
|
|
|
|
|
|
`lpr -o number-up={{2|4|6|9|16}} {{path/to/file}}`
|