Operating System - HP-UX
1753964 Members
7301 Online
108811 Solutions
New Discussion

I need to change the ESC CODES sent to an HP Laser jet printer when printing in postscript

 
TwoProc
Honored Contributor

I need to change the ESC CODES sent to an HP Laser jet printer when printing in postscript

Ok, I've determined that when doing postscript, the -otray... doesn't work. I've been at this for 3 days now! I know that at the end of 2006, I found a generic article for Unix systems on how to change the destination tray sent to a printer. It was an issue of change the numbers (oddly enough) that were assigned to the HP trays (8,4,2,1 etc). I could have sworn that I made the changes in /etc/ or in /dev. From what I can tell and my current testing - it was NOT in either /etc/lp/interface/ and NOT in /etc/lp/interface/model.orig/.

I tested this by adding a NEW printer to the system, (using hppi) and comparing the files from the printer that works, and the printer that doesn't. They are EXACTLY the same. And yet - If I print to two printers that are EXACTLY the same using the two defined printers, I get different tray results. Which is what I expected, because I had to go to some different place to make the changes. If I take the two printers and swap them out (they are both the exact same model), then the problem doesn't travel with the printer, it stays with the IP address of the "new" printer, even if I swap old with new by rolling old printer to new location, and plugging in, swapping IP addresses hard coded into the printer, and doing the same with the other. In other words, an even swap. And still, the printer which is now defined as the "OLD" one can print to the right tray, and the old one sitting in the "NEW" one's slot cannot.

So, it's definitely sitting at the OS level. And it's not the command line option from "lp", and its not in the two interface files under /etc/lp/interface and /etc/lp/interface/model.orig (they are exactly the same for both printers, except for the names of the respective printers of course).

The file being printed comes from oracle which is using the lp command with the "-oraw" option. The result is the same if I use the "-ops" option. Either way, it works the same - great for the old defined printer, bad for the new. Keep in mind that if you use either of those, the rest of your "suggestions" for printing are ignored, and the commands come from the postscript file itself.

I know to the day when I created the printers, and have verified this via my old electronic appointments calendar in which the tech rep was here on site, and it agrees with his old electronic calendar (Palm Pilot). The only files I can find changed within that very week are, sadly the two files previously mentioned in /etc/lp/interface and model.orig! Which means that the other files I've touched in the system have been touched afterwards, I guess!

I've researched tons of articles on ITRC and also the internet in general, and I can't make any headway. I also scoured all I could find in /opt/hpnpl/sh as well as the scripts in /opt/hpnpl/admin/printers - both printers are using "10.cfg" from here. Once again, everything the same... sigh.

Can anyone tell me what else controls printer trays (attributes) besides /etc/lp/interface and model.orig and /opt/hpnpl/admin/printers/xxx.cfg files?

I know that I've seen it/did it before. I remember it WASN'T an HP document that I used, and that I seem to remember it was more of a general UNIX reference sheet for lp. Sun or IBM possibly, I'm thinking Sun right now, but that may not be right.

Any help appreciated.
We are the people our parents warned us about --Jimmy Buffett
1 REPLY 1
Bill Hassell
Honored Contributor

Re: I need to change the ESC CODES sent to an HP Laser jet printer when printing in postscript

The problem is not in HP-UX, or even in lp. The problem is Postscript. This is a standalone page definition language and HP-UX provides very minimal support to set options in Postscript. All of this is controlled in the printer's script in the Postscript section. Postscript requires (very wordy) commands to be inserted at the right location to control printer hardware whereas PCL printing (and the PJL language that controls HP printer hardware) is much simpler to adjust. Note also that all HP printers are NOT the same and are NOT guaranteed to produce the same results. The reality is that newer printers are becoming less compatible with older models.

There is only one location that can modify the code generated from Oracle and that is the model.orig script for the printer. You'll need to look at the Postscript section of the script to see what actually works (most -o options will not work as there is not equivalent way to modify Postscript code). You can certainly modify the script -- I would suggest getting a Postscript level 1 or level 3 manual and customize the printer script.


Bill Hassell, sysadmin