Operating System - HP-UX
1828670 Members
2000 Online
109984 Solutions
New Discussion

edit model script defaults

 
eric barker_2
Occasional Contributor

edit model script defaults

I am new to HPUX printing (coming from TRU64 with printcap and filters)

I am trying to set up an HP print queue that will always print landscape, and always print a specific font size. I created the printer with HPPI, that was easy. I found the /etc/lp/interface/model.orig/

Can I just edit this file, which appears to just be a copy from a template, to get the disired results. Again, I want this printer to always default to landscape and a smaller font.

What do I need to edit, since my application can not call lp -d commands...it just prints to directly to the printer queue.

Thanks, Eric
6 REPLIES 6
LoC_1
Frequent Advisor

Re: edit model script defaults

Hi

/etc/lp/interface houses shell script that can be modified for your particular printer.

As long as you know what to change it too

That file is generated from /usr/lib/lp/model which should not be modified

Louis
eric barker_2
Occasional Contributor

Re: edit model script defaults

Louis,

Thanks, I was aware that the interface files can be edited.

My question is:

What exactly do you need to change in these files? Where can you find documentation on this? HP documentation is pretty sparse on this...at least I can't find it.

Still looking for help or an example of what to change in these printer interface scripts so that a printer will always print landscape.
A. Clay Stephenson
Acclaimed Contributor

Re: edit model script defaults

Yes, the model.orig/printername file is called the interface file. It is actually called by the printername script file in the directory above. Both of these are shell scripts. The idea is to examine the model.orig/printername file. Look for the -o landscape ogic and simply set that to true. The same will be true for choosing a default font size.
If it ain't broke, I can fix that.
eric barker_2
Occasional Contributor

Re: edit model script defaults

Clay,

Thanks, I will try this as soon as I get into work tomorrow am.

Do you know if there are any good examples or documents on modifying these interface scripts?

We have about 75 printers to set up in HPUX. They are all going to require two print queues as near as I can tell. One for Portrait and one for Landscape. (at least that is how we did it in TRU64)

But I am open to any other ideas, since I am new to HPUX printing! Does LPADMIN have any advantages over HPPI (hippie :)
Bill Hassell
Honored Contributor

Re: edit model script defaults

For HP printers, the interface scripts are fairly detailed. There is a section where many variables are set to a default value. A quick way is to use vi to search for landscape and portrait as keywords. Just set the orientation to the desired value. The scripts can be edited at any time, no need to stop the spooler.

The HP-UX spooler is a SysV lp spooler while Tru64 is a BSD spooler. So while you have a printcap file in a BSD spooler and use lpr to print, in a SysV spooler, the command is lp with options. The -o options are specific to the printer script. lpadmin is the lp spooler maintenance command but it is incapable of adding/changing an HP JetDirect LAN connection, thus the need for hppi. But the good news is that you don't need hppi...just use addqueue, modifyqueue and removequeue for printer changes. Use lpadmin for direct connect (ie, parallel or serial) printers and for remote (print server or non-HP LAN cards in printers).


Bill Hassell, sysadmin
eric barker_2
Occasional Contributor

Re: edit model script defaults

All comments lead to the resolution, by finding the correct model file, searching for "orientation", and setting "DEF" to "l" for landscape. The are many other options that will help in these files too.