Operating System - HP-UX
1823083 Members
3572 Online
109646 Solutions
New Discussion юеВ

Re: hpux printer configuration

 
ben_scott
Advisor

hpux printer configuration

I have an HPUX machine that prints through Remote Print Manager(RPM) to an HP network printer. The RPM is set to forward the raw print job to the printer. Is there a way to format the print job on the HPUX machine through a model script, like a network printer, before sending it to this remote printer?
4 REPLIES 4
Matti_Kurkela
Honored Contributor

Re: hpux printer configuration

If you can write your own model script for that printer, then yes.

If you want to try, start by reading "man lpadmin".

See /usr/lib/lp/model/rmodel to see how the remote printer is normally handled. Your new model script should essentially perform any formatting like a regular model script for your printer model, but capture the output of the formatting command(s) into a temporary file instead of allowing it to flow into the standard output.

The last step in the script would be to pass the output file to the /usr/sbin/rlp command with appropriate parameters.

MK
MK
ben_scott
Advisor

Re: hpux printer configuration

Thank you very much! That is what I thought might be the answer.

Can I start with the model script that would be used by a network or local printer and try to modify it to use rlp?

If anyone has any examples for writing a custom model script (HP printer), I would be most interested to see how you did it.

Bill Hassell
Honored Contributor

Re: hpux printer configuration

There are two printer languages in the world:

PCL (which is plain ASCII plus (HP) codes for features)
and
Postscript

HP-UX provides a trivial postscript model which can take a plain ASCII file and convert it to Postscript, but the result is just ASCII text on the paper.

You can look at model scripts in the /usr/lib/lp/model directory but virtually all of them are for HP printers, and many have extensive option lists. These scripts can be intimidating since they are fairly lengthy. Start with the dumb script to see the basics. The rest involves getting a printer reference manual to do what you want. The codes to rotate portrait to landscape are trivial but if you want to change fonts and page layout, plan to spend a lot of time in the Tech Ref manuals.

I have attached an lp model script paper I wrote several years ago. It still applies for 11.x today.


Bill Hassell, sysadmin
ben_scott
Advisor

Re: hpux printer configuration

Very awesome! I will give it a go. I talked them into opening up our server to see the printer directly until I can resolve this issue.

Thank you guys so much for such quick and accurate advice.