Operating System - HP-UX
1752657 Members
5364 Online
108788 Solutions
New Discussion юеВ

Re: how to direct print job to a particular tray, from Unix, using existing printer "form"

 
SOLVED
Go to solution
Dave Holgate
Advisor

Re: how to direct print job to a particular tray, from Unix, using existing printer "form"

Bill,
well... i haven't been successful yet. almost everything you've written i've found correct, except about the interface file. it seems like whether i create a new queue with addqueue, or use the one i have (reg1atrn), i don't get a file with any "def" settings in it in /etc/lp/interface. i DO see files with those settings in /etc/lp/interface/model.orig/... also, the banner which prints when i print from unix is in there; i know 'cuz i added my initials to the "Output Summary" line, which is echo'd out in that script, and it printed on the banner page.

however, if i change the script in /etc/lp/interface/model.orig/reg1atrn, it doesn't seem to affect the destination of the printjob. i added the line:
outb="2", then tried it with outb="3".

assuming i'm fixing the right file (i'm partly right?, as this method definitely changes the banner that's printed), is there something i need to do to make the changes "take effect"?

if i'm NOT fixing the correct file, i don't know where to turn next; i've attached the /etc/lp/interface/reg1atrn file, since i couldn't attach both files - i guess i could attach it to another post...

did i miss sumthin? ;^O
dave
Dave Holgate
Advisor

Re: how to direct print job to a particular tray, from Unix, using existing printer "form"

and here's the /etc/lp/interface/model.orig/reg1atrn file (attached)
Bill Hassell
Honored Contributor
Solution

Re: how to direct print job to a particular tray, from Unix, using existing printer "form"

The model script you are using is a net_lj3x, in other words, for a LaserJet 3 which was new about 1989. Printers with trays were a long time after that. The reason that addqueue picked this is that multifunction printers are very new and you need to upgrade hppi with all the new printers you are using. Here is the website:

http://www.hp.com/pond/modelscripts/index2.html

Once you download and install this model script, delete the current printer with:

deletequeue -h myprinter

and then add it back again with addqueue. If it does not pick the net_lj4100 script, use addqueue -l to list all the available printers. Look for the 4100 and note the ID number. Then add the printer using addqueue and add the -i option with the ID number. That will add the printer with the correct model script. Now your -o options for the trays will work. Always test WIHTHOUT your application (ie, lp -dmyprinter -osomething...). Once the trays work OK, then add the printer again as mentioned above and you'll see all the "def" options in the script.


Bill Hassell, sysadmin
F Verschuren
Esteemed Contributor

Re: how to direct print job to a particular tray, from Unix, using existing printer "form"

I use to change the line:
paper="def"

to
paper="a4"
or
paper="leter"

If you tel you printer that all the paparsze leter is tray 3 it wil than print from tray 3.
Dave Holgate
Advisor

Re: how to direct print job to a particular tray, from Unix, using existing printer "form"

Bill,

JEEEEEEEEEEPERS!!! we're ONLY 20 years behind, no need to get grouchy!!!! ;^)

seriously, though, i thought that there might've been something weird going on when your otherwise accurate instructions and descriptions suddenly went awry! i'll check this out and get back to you as soon as i can, hopefully today. this is my priority today, so, i'll be working on it.

thanks, so much, Bill and everyone, for your suggestions.
dave
Dave Holgate
Advisor

Re: how to direct print job to a particular tray, from Unix, using existing printer "form"

all:

well... this has been a nightmarish learning experience!!!

what i discovered, eventually, is that there actually WAS programming code controlling the trays in the VAR software - an obscure insert to an even more obscure program, which executed this line:
PRINT RESET:CONDENSED:LOWER.TRAY

now, another insert controlled these variables, setting LOWER.TRAY as such:
019: ESC = CHAR(27)
020: RESET = ESC:'E'
021: DPI.600 = ESC:"&u600D"
022: LOWER.TRAY = ESC:'&l4H'
023: PAGE.LEN.88 = ESC:'&l88F'
024: ENV.FEEDER = ESC:'&l6H'
025: HP8000.TRAY1 = ESC:'&l4H'
026: HP8000.TRAY2 = ESC:'&l1H'
027: HP8000.TRAY3 = ESC:'&l5H'
028: HP8000.TRAY4 = ESC:'&l20H'
029: HP8000.ENV = ESC:'&l6H'
030: DUPLEX.OFF = ESC:'&l0S'
031: DUPLEX.ON = ESC:'&l1S'
032: DUPLEX.ON.LAND = ESC:'&l2S'
033: FORM.FEED = CHAR(12)

notice how someone programmed "LOWER.TRAY" and "HP8000.TRAY1" to the same escape sequence, which clearly was printing to tray 1 (or the "manual feed tray" as i call it to remove any doubt). this is why no matter what i did at the Unix level, the printer was getting those escape sequences in its data stream, and over-riding the Unix settings, and printing to tray 1.

so, i fixed that, and now the string says:

* LMC Mod
BEGIN CASE
CASE V.TRANSCRIPT.GROUPINGS.ID = "GA" OR V.TRANSCRIPT.GROUPINGS.ID = "UA"
PRINT RESET:CONDENSED:HP8000.TRAY2
CASE V.TRANSCRIPT.GROUPINGS.ID = "G" OR V.TRANSCRIPT.GROUPINGS.ID = "U"
PRINT RESET:CONDENSED:HP8000.TRAY3
CASE 1
PRINT RESET:CONDENSED:HP8000.TRAY1
END CASE
* PRINT RESET:CONDENSED:LOWER.TRAY: ;* this points to the manual feed tray, actually!!!!!
* JD End-Mod

so, basically, print unofficial transcripts to tray 2, official transcripts to tray 3 (with pre-printed paper), and all other jobs to tray 1 (will never happen in this pgm).

this all seems to work.

however (and there always is one!), now i have a different problem. i can't seem to control other print jobs to NOT pull from the preprinted forms in tray 3. i CAN set the printer paper types in the different trays - no problem - and i think that's the generic way to handle this. however, what i'm finding is that this printer (HP4100MFP) is being printed to with a net_lj3x interface file. i can't see it currently because i'm replying, but i think that's one of the things we've talked about in prior pieces of this thread. my problem is that when i did everything we talked about: created a new printer, adjusted it to force printing on tray 3; when i printed on it, it only printed part of the job, namely the first line... the rest of the 2 pages which printed were blank. i'm pretty sure that some kind of code or escape sequence is in this VAR software which is really confusing the net_hp4100 driver. so, i can't use it yet... and therefore, i can't use the more sophisticated (or at least, more modern) features like 'mtype="Preprinted"' until i figure it out. ;^( if i could use them, i could control it better. i'll keep trying to figure out why this driver doesn't want to work, yet.

i'll get there eventually... thanks for all of your support, you've been VERY helpful...
thanks,
dave
Dennis Handly
Acclaimed Contributor

Re: how to direct print job to a particular tray, from Unix, using existing printer "form"

>Bill: deletequeue -h myprinter

Bill has corrected this to use:
removequeue -q myprinter