Operating System - HP-UX
1847383 Members
5331 Online
110264 Solutions
New Discussion

Re: Change the default tray when you create the printer queue

 
sujeet joshi
Frequent Advisor

Change the default tray when you create the printer queue

Hi,

Is it possible to change the default tray when you create the printer queue in HPUX 11i?

Is it possible to have the tray option in "lp" command.
The printer model is Ricoh Aficio 2045e.

Thanks in advance.

Sujeet
3 REPLIES 3
Bill Hassell
Honored Contributor

Re: Change the default tray when you create the printer queue

All printers in HP-UX are run with printer scripts. For directly connected printers, the tamplate scripts are in /usr/lib/lp/model. For printers connected using an HP network card or adapter (called JetDirect), the scripts are in /opt/hpnpl/sh. However, there are no scripts for non-HP printers except generic/dumb scripts and it is highly likely you connected the Richo with it's own built-in LAN card. This card emulates the lpd/lpr protocol which does not allow any -o options to work, thus no way to select any tray or other options like landscape mode. The same is true if the printer is actually connected to anotner, non-HP-UX system.

Now if the printer is using an HP JetDirect network card, you can modify the printer script in the directory /etc/lp/interface/model.orig where you will see the script has the same name as your printer. If the Richo uses HP's PCL/PJL language, you can set the default paper tray in the default section of the script. If you do not see the printer's script in this directory then it is not a JetDirect connection and the actual script is one level up in /etc/lp/interface, most likely the generic rmodel script which just sends the job to the printer, no options.


Bill Hassell, sysadmin
sujeet joshi
Frequent Advisor

Re: Change the default tray when you create the printer queue

Hi,

Thanks for the help.

Printer is using Jetdirect card and script we are using is ljx000.

I have checked the path as mentioned and opened that printer queue name script but I am not able to find out the Tray option in that file.

Please help me.

Thanks,
Bill Hassell
Honored Contributor

Re: Change the default tray when you create the printer queue

Excellent. The man page for net_ljx000 gives you the command line option. For example:

lp -dmyricoh -otray4 some_file

If that works OK, then the defaults are found in the script. NOTE: there are several tray options, source paper tray, destination tray, banner page tray. The variables are named:

mediasrc="def"
bannerpagesrc="def"
mediadest="def"

These variables are defined at about line 1190 of the current version of the script, but just search for those lines and change "def" to the number you'd like to use. You'll have to figure out (or experiment) what number triggers which tray in your Richo. Change the script in the model.orig difrectory (not the template in /opt/hpnpl/sh). You can override the new default by using -o options.


Bill Hassell, sysadmin