Examples: Difference between revisions
(New page: '''A sampler of lp commands''' If you use command line to print, send only postscript or pdf files to the copier. The basic command is lp file.pdf By default, you will get dup...) |
No edit summary |
||
(4 intermediate revisions by the same user not shown) | |||
Line 10: | Line 10: | ||
lp -d P file.pdf (send file to printer P - e.g. P=5) | lp -d P file.pdf (send file to printer P - e.g. P=5) | ||
lp -o sides=one-sided file.pdf (to each page on one side only) | |||
lp -o ColorModel=color file.pdf (print in color) | lp -o ColorModel=color file.pdf (print in color) | ||
lp -o sides=two-sided-short-edge file.pdf (duplex along short edge instead of long) | lp -o sides=two-sided-short-edge file.pdf (duplex along short edge instead of long) | ||
lp -o page-ranges=1 (print just page 1) | |||
lp -o page-ranges=1-4,7,9-12 | |||
You can combine these commands, for example: | You can combine these commands, for example: | ||
Line 24: | Line 28: | ||
your lpoptions commands are saved in the file ~/.cups/lpoptions. Typing '''lpoptions''' by itself will show you what your current printer setup is. | your lpoptions commands are saved in the file ~/.cups/lpoptions. Typing '''lpoptions''' by itself will show you what your current printer setup is. | ||
'''Checking the queue and cancelling jobs''' | |||
Use the lpstat command to check the status of a queue and cancel to cancel jobs | |||
lpstat -d5 -t (checks jobs on queue 5) | |||
cancel 5-241 (deletes job 5-241 from queue 5) | |||
You can also cancel jobs using the printer icon which will appear in the top right hand | |||
corner of your screen when you start your job. To do this, open the printer icon, right | |||
click on your job and select cancel (not delete). |
Latest revision as of 16:47, 1 November 2011
A sampler of lp commands
If you use command line to print, send only postscript or pdf files to the copier. The basic command is
lp file.pdf
By default, you will get duplexed (long-edge), grayscale prints if you print to the copiers. Some useful options are
Examples:
lp -d P file.pdf (send file to printer P - e.g. P=5) lp -o sides=one-sided file.pdf (to each page on one side only) lp -o ColorModel=color file.pdf (print in color) lp -o sides=two-sided-short-edge file.pdf (duplex along short edge instead of long) lp -o page-ranges=1 (print just page 1) lp -o page-ranges=1-4,7,9-12
You can combine these commands, for example:
lp -o sides=two-sided-short-edge -o ColorModel=color file.pdf (useful for printing tri-fold brochures)
lpoptions
Use the lpoptions command to save these options for later use. For example, you might want to do color printing to the printer on another floor, reserving the printer on your own floor for the normal grayscale prints. This command will ensure that anything you send to the 5th floor printer will be printed in color:
lpoptions -d 5 ColorModel=color
your lpoptions commands are saved in the file ~/.cups/lpoptions. Typing lpoptions by itself will show you what your current printer setup is.
Checking the queue and cancelling jobs
Use the lpstat command to check the status of a queue and cancel to cancel jobs
lpstat -d5 -t (checks jobs on queue 5) cancel 5-241 (deletes job 5-241 from queue 5)
You can also cancel jobs using the printer icon which will appear in the top right hand corner of your screen when you start your job. To do this, open the printer icon, right click on your job and select cancel (not delete).