tldr/pages/common/lpr.md

34 lines
804 B
Markdown
Raw Normal View History

# lpr
> CUPS tool for printing 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`.
> More information: <https://www.cups.org/doc/man-lpr.html>.
- 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. 216):
2020-11-27 01:06:38 +00:00
`lpr -o page-ranges={{2|2-16}} {{path/to/file}}`
- Print double-sided either in portrait (long) or in landscape (short):
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}}`
- 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}}`