Operating System - HP-UX
1752290 Members
4426 Online
108786 Solutions
New Discussion юеВ

Re: Enable duplex printing on HP-UX

 
SOLVED
Go to solution
Ganesan R
Honored Contributor

Enable duplex printing on HP-UX

Hi All,

I have a requirement to enable duplex printing on one of the network print queue.

If i am not wrong, we need to do this via the model script available in /etc/lp/interface/
But not sure which options and syntax to be included in the model script. Currently i don't see any keyword like duplex in the script.

/etc/lp/interface# grep -i duplex madprt0014
/etc/lp/interface#

Could someone help to make it work?
Another doubt is that, will this option work in canon printers ?

Waiting for your replies...
Best wishes,

Ganesh.
5 REPLIES 5
Pete Randall
Outstanding Contributor
Solution

Re: Enable duplex printing on HP-UX

Are you using the JetDirect Printer Installer (hppi)? You should enable duplex within hppi:

hppi > 3 Modify > select printer > 4 Additional options > 8 Duplex


Pete

Pete
Ganesan R
Honored Contributor

Re: Enable duplex printing on HP-UX

Thanks Pete. Will try that option and let you know.

Meanwhile if others knows any other options like modifying the script, etc.. please let know..

Thanks in advance.
Best wishes,

Ganesh.
Bill Hassell
Honored Contributor

Re: Enable duplex printing on HP-UX

For JetDirect printers (that is, HP printers with a network connection) then the actual printer script is located in /etc/lp/interface/model.orig

To see if your printer script supports duplex, run this test page:

lp -dmadprt0014 -ooptions /etc/issue

The options page will show the available options. If duplex is available, then test with something like:

man terminfo | head -500 | lp -dmadaprt0014 -oduplex

If you need to make the change permanent, you can edit the script. Look for:

duplex="def"

and change this to:

duplex="vduplex"

Note that this is for portrait mode printing. If you print in landscape mode, use the option -ohd as in:

lp -dmadprt0014 -olandscape -ohd

which will print the reverse side in the proper orientation.


Bill Hassell, sysadmin
Ganesan R
Honored Contributor

Re: Enable duplex printing on HP-UX

Thanks Pete and Bill for your fast responses.

Pete, I don't see the Duplex settings in additional options. I could see only these options.


Options: Current Settings:
-------- -----------------
1) Job Recovery [ON]
2) True End-of-Job [ON]
3) Banner Page [ON]
4) Default Printing Language [AUTO]
5) PostScript Level [Level 2]


Bill, need a clarification from you. Which model script will be used by the print queue?

Is it /etc/lp/interface/ or /etc/lp/interface/model.orig/

first one doesn't contain the keyword "duplex" whereas the second one contains the below.

/etc/lp/interface/model.orig# grep -i duplex madprt0014
echo "dpi#, simplex, duplex, hduplex, topaz, yb, nb, job, nojob"
echo "dpi#, simplex, duplex, hduplex, topaz, yb, nb, job, nojob"
echo "dpi#, fuser simplex, duplex, hduplex"
duplex="def" # CHANGE DEFAULT DUPLEX MODE
# duplex
duplex="simplex";;
vd | duplex | double | d) # vertical binding
duplex="vduplex";;
hd | hduplex) # double side, horizontal binding
duplex="hduplex";;
md | mduplex) # duplexing manually
manuald="" # invalidate manual duplex

Should i need to modify only /etc/lp/interface/ ?
Best wishes,

Ganesh.
Bill Hassell
Honored Contributor

Re: Enable duplex printing on HP-UX

> Should i need to modify only /etc/lp/interface/ ?

This is an artifact of the JetDirect (hppi) software. For these printers, the /etc/lp/interface directory will contain a generic network script which is responsible to transfer the filtered job to the printer. This script is virtually the same for all printers except internally, it is personalized for the printer's IP address or hostname.

This generic script actually passes the print job to the model.orig script which does the filtering by pre-pending and post-pending escape sequences to the file. The output of the model.orig script is what is sent to the printer.

So as you have seen, the duplex options are indeed in the model.orig/madprt0014 file and that is where you would change the default value. Note that once you change the script, all jobs will print double sided. If you want a single sided printout, just use the -osimplex option to lp and that will override the added duplex=hduplex line.


Bill Hassell, sysadmin