General
cancel
Showing results for 
Search instead for 
Did you mean: 

HP-UX 11.11 dot matrix printing issues.

 
Highlighted
Super Advisor

HP-UX 11.11 dot matrix printing issues.

I am trying to set up an Okedata 321 Turbo to print from an HP-UX 11.11 system. The printer is connected to an HP Jetdirect box.
I use the command
"ddqueue -b off -h XXX.XXX.XXX.XXX -q Q_NAME -i 9998" to set up my print queue (The Xs are replaced with the actual IP address of the JetDirect unit).
Then using the lp command
"lp -d Q_NAME /etc/hosts" I test my printing. The print is all out of format, line feeds are not at all correct.
I then tried printing using this command
"/usr/bin/ux2dos /etc/hosts | lp –d Q_NAME"
The output was formatted properly. So, here is my question.
Is there some way to force all print jobs to this printer to filter through ux2dos? I cannot make any changes to the printer or JetDirect unit as other systems also print to this printer properly.
Thanks for any assistance, points will be assigned.
6 REPLIES 6
Highlighted

Re: HP-UX 11.11 dot matrix printing issues.

>Is there some way to force all print jobs to this printer to filter through ux2dos?

You could fiddle with the model scripts to do this.

>I cannot make any changes to the printer or JetDirect unit as other systems also print to this printer properly.

Why not? Typically if you add an extra CR to the end of each line, it shouldn't hurt if there already is one. I.e. try it and see if you break things. That would be easier than editing the model script if you aren't a code monkey.
Highlighted
Super Advisor

Re: HP-UX 11.11 dot matrix printing issues.

The problemis that this is not a client that has an HP-UX admin. I'm trying to find a solution that is both simple, and easily repeatable for non HP-UX people.
Altering printer model scripts and adding escape characters is more complicated process than I'd like to provide. There are a few different makes and models of DM printers here, so this would end up being a customized process for each. Also, I do not have any documentation for any of them, so I do not know what the exact codes are.
What I was hoping for was a way to set up some sort of "dummy" queue. Anything sent to that queue would be put through the ux2dos fileter and then back out to the printer.
My only other option would be to print to a file, and then have a shell script that runs through cron to push the files through ux2dos and on to the printer.
Highlighted
Honored Contributor

Re: HP-UX 11.11 dot matrix printing issues.

try a different interface file, like dumb or some other.

cp /usr/spool/lp/model/dumb /etc/lp/interface/model.orig/Q_NAME

Highlighted
Honored Contributor

Re: HP-UX 11.11 dot matrix printing issues.

"I cannot make any changes to the printer or JetDirect unit as other systems also print to this printer properly."

IF the "other" systems are Window's based, you *might* still be able to fiddle with the Auto LF / Auto CR settings and get it to format properly. A lot of Windows drivers override the front panel settings anyway.

It can't hurt to test it (at least not much)
Highlighted
Honored Contributor

Re: HP-UX 11.11 dot matrix printing issues.

The problem is that your client is trying to use a non-HP printer. While the addqueue command works fine, as you have demonstrated with the use of -i 9998 which uses a generic printer script.

> I'm trying to find a solution that is both simple, and easily repeatable for non HP-UX people. Altering printer model scripts and adding escape characters is more complicated process than I'd like to provide.

As you might expect, HP is not going provide printer scripts for non-HP printers. If the client cannot use a modified printer script, then tell the client to replace all the printers with HP printers.

> There are a few different makes and models of DM printers here, so this would end up being a customized process for each. Also, I do not have any documentation for any of them, so I do not know what the exact codes are.

Therein lies the difficulty in trying to support a lot of different printers. However, most printers can print plain ASCII so a dumb printer script should work.

> What I was hoping for was a way to set up some sort of "dummy" queue. Anything sent to that queue would be put through the ux2dos fileter and then back out to the printer.

The issue is with the -i 9998 choice. This is definitely NOT a generic printer but a rather full-featured HP PCL printer script. Although not intuitive at all, the script called dumbplot_printer_cr (which is -i 9992) will fix the basic problem with line feeds. Just remove the printer and re-add it like this:

removequeue -q Q_NAME
addqueue -b off -h XXX.XXX.XXX.XXX -q Q_NAME -i 9992

You'll see the contents of all the JetDirect scripts in /opt/hpnpl/sh. The dumbplot_printer_cr script is only 32 lines long and should handle any basic printer requirements (even HP printers) although there are no options available with this script.


Bill Hassell, sysadmin
Super Advisor

Re: HP-UX 11.11 dot matrix printing issues.

Client decided to go with LaserJet printers and simply print multiple copies of the document.
Thanks for all the help.