Printing Duplex via LPR on CCIS Linux machines
Last updated February 2, 2012
How to print Duplex using Cup’s version of LPR. These steps have been tested on a Linux machine.
Note: This document explains the use of the lpr command on a system which has already been set up to print to our printers. For instructions on setting up a machine to print to our printers in the first place, see the tutorials available on our Printing page. CCIS Systems-managed Linux and Windows machines come with printing pre-configured.
Using lpoptions to get available printer settings
[phoenix@login-linux] [~] lpoptions -h print -p okeefe
media=Letter sides=one-sided finishings=3 copies=1 job-hold-until=no-hold job-priority=50 number-up=1 auth-info-required=none job-sheets=none,none printer-info=okeefe printer-is-accepting-jobs=1 printer-is-shared=1 printer-location='310 WVH' printer-make-and-model='HP LaserJet 2200 Foomatic/hpijs' printer-state=3 printer-state-change-time=1257875748 printer-state-reasons=none printer-type=36884
These options get you the current settings of the printer you specify.
Using lpoptions to get the list of printer options that can be set
[phoenix@login-linux] [~] lpoptions -h print -p okeefe -l
PrintoutMode/Printout Mode: Draft *Normal High InputSlot/Media Source: *Default PhotoTray Upper Lower CDDVDTray Envelope LargeCapacity Manual MPTray PageSize/Page Size: Custom *Letter A4 Photo Photo5x7 3x5 5x8 A5 A6 B5JIS CDDVD80 CDDVD120 Env10 EnvC5 EnvC6 EnvDL EnvISOB5 EnvMonarch Executive FLSA Hagaki Legal Oufuku w558h774 w612h935 PageRegion/PageRegion: Custom Letter A4 Photo Photo5x7 3x5 5x8 A5 A6 B5JIS CDDVD80 CDDVD120 Env10 EnvC5 EnvC6 EnvDL EnvISOB5 EnvMonarch Executive FLSA Hagaki Legal Oufuku w558h774 w612h935 Duplex/Double-Sided Printing: DuplexNoTumble DuplexTumble *None Quality/Resolution, Quality, Ink Type, Media Type: *FromPrintoutMode 300DraftGrayscaleK 300GrayscaleK 600GrayscaleK
Format: lpoptions -h <print server> -p <printer> -l
These options will get you a list of options you can set via the command line. These lines can be diciphered as:
Name of Option/As the GUI Shows it:Possible Options (with * denoting the current default)
Using grep to get only the options you care about
[phoenix@login-linux] [~] lpoptions -h print -p okeefe -l | grep uplex
Duplex/Double-Sided Printing: DuplexNoTumble DuplexTumble *None
This lets us pick out the Duplexing options out of the others that we may not care about. In this case the option name is “Duplex” and is currently set to “None”.
Using the newly found option to print Duplex
[phoenix@login-linux] [~] lpr -Pokeefe -o Duplex=DuplexNoTumble test.txt
We take the option that we learned previously, and set it by adding “-o Duplex=DuplexNoTumble” to the LPR line.
Other ways to print Duplex
[phoenix@login-linux] [~] lpr -Pokeefe-duplex test.txt
For every printer that can duplex, there exists a -simplex and -duplex queue that simply forces either option.
Document Updates
2010-02-23 typo fix, reported by W. Nowak, thanks!
You must log in to post a comment.