Operating System - HP-UX
1834789 Members
3019 Online
110070 Solutions
New Discussion

Re: Non-HP Printers Scripts.

 
Glen Pursley
New Member

Non-HP Printers Scripts.

I have a diverse assortment of printers on my NT network, including several line printers (Okidata, Epson and Tally). I can set them up with JetDirect on my HP-UX 10.20, but using the dumbplot_printer profile is not satisfactory. I still get control codes from the HP that causes unwanted form feeds. Is there a resource out there that will help me learn what I need to know to modify the script? Or does someone know a better way?
Those who think they don't need help actually need it the most.
7 REPLIES 7
Bill Hassell
Honored Contributor

Re: Non-HP Printers Scripts.

In the standard HP-UX directory for model scripts, there is a very simple script called /usr/lib/lp/model/dumb which is probably more useful than the dumbplot script as it is oriented towards pen plotters. Just copy /usr/lib/lp/model/dumb to /etc/lp/interface/model.orig/ where is one of the EPSON, etc printers.

As far learning about model scripts, I wrote a 2 part article about writing model scripts for HP-UX in the Interex magazine about a year ago. Part 1 is attached to this post.


Bill Hassell, sysadmin
Bill Hassell
Honored Contributor

Re: Non-HP Printers Scripts.

And attached is part 2. (click on the upper right corner to see the attachment)


Bill Hassell, sysadmin
Glen Pursley
New Member

Re: Non-HP Printers Scripts.

Bill - Thank you, I think that will help a lot. I will let you know once I have been able to test it.
Those who think they don't need help actually need it the most.
Tim Malnati
Honored Contributor

Re: Non-HP Printers Scripts.

It is not often that I can add anything to a posting from Bill Hassell; his knowledge level and capability of communicating is astounding. You are almost guaranteed to learn something.

A couple of notes...

There is the standard dumb model that Bill mentions and there is a dumb model that also adds a carriage return. I have only seen this model available in the newer distributions of JetAdmin. I have found that the carriage return may be needed in some environments that have been ported to both unix and NT. Often you can correct the situation within the application, but it is often easier to handle it with the model script. The classic symptom is the printing stair steps across the page.

Also... Some of the printer manufacturers have actually written model scripts that allow you to get at additional printer features in an HPUX environment. I know Genicom has them, for instance. In these days of the internet it might be worth it to look for these in the support areas of the manufacturer's sites.
Glen Pursley
New Member

Re: Non-HP Printers Scripts.

Most of my printing problems have been resolved, but I still have trouble with unwanted form feeds at the beginning of a print job. All of my applications seem to put either a ^[P or a ^L at the very beginning of the print job. These both cause most of my printers to do a form feed before they begin to print. Is there anything I can do in the "dumb" script to change this behavior, or do I need to take a different approach?
Those who think they don't need help actually need it the most.
Rick Garland
Honored Contributor

Re: Non-HP Printers Scripts.

There may be options inside the driver script that you can comment out. If it just form feed that you don't want as an example, look for the commands in the driver script for the printer and then comment the line. This will take some looking at.

Also, there may be a switch or jumper setting on the printer that you can toggle and this behavior will go away.

See if there is a manual for the printer. A lot of the printer manuals come with a translation table. If the printer receives the character ^P, it will do .
Bill Hassell
Honored Contributor

Re: Non-HP Printers Scripts.

As far as the extra characters go, yes, you can modify the dumb script by processing each line of text from the print job and stripping the CTRL-P and CTRL-L characters. If the (offending) programs are consistent and always put the extra characters on the first line, you could simplify the script to read each line but skip printing the first one.

If the application(s) handle things differently, you might create -o style options that the script can see in the lp command line and turn on special processing as needed.


Bill Hassell, sysadmin