Difference between revisions of "Examples"

From UW-Math Wiki
Jump to: navigation, search
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)

Revision as of 16:18, 18 October 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

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)