Operating System - HP-UX
1836611 Members
3907 Online
110102 Solutions
New Discussion

configuring a printer on hp-ux

 
SOLVED
Go to solution
Morcos
Super Advisor

configuring a printer on hp-ux

HI all,
I have a printer and want to configure it on a unix server; and have to use A4 and A3 how to proceed; shall I create the printer twice once for A4 giving it a name like "printerA4" and once for A3 "printerA3" and which file should I change; Also if I want to change let's say the margin for printing what to do.

Regards,
5 REPLIES 5
Greg Vaidman
Respected Contributor

Re: configuring a printer on hp-ux

If you are using the JetDirect printer installer for UNIX (product # J4189), the options for paper type and margin can be specified as options to "lp." For example, "lp -oA4" to print an A4 page, or "lp -otm4 -olm20 -orm8 -oA3" to print an A3 page with top margin of 4 lines, left margin of 20 lines, and right margin of 8 lines. See the man page for net_ljx000 for more examples. For a list of all available man pages for model scripts, run "ls /opt/hpnpl/man/man1/net*"

If these are direct attach printers, see the options in the appropriate file for your printer in the directory /var/spool/lp/model/. If your printer supports the options for paper size and margin, the options should be very similar, if not identical, to the ones for JetDirect printers.

Regards,
Greg
Morcos
Super Advisor

Re: configuring a printer on hp-ux

Thx Greg for ur answer.I'm using a jetdirect printer and the printer has many bays one for A4 and other for A3, but instead of using the options with lp, where can i change the settings for page to put it A4 or A3 or the font size . and thx in advanced

Ziad

Greg Vaidman
Respected Contributor

Re: configuring a printer on hp-ux

Choosing the tray and font size are both options for lp. Just see the man page for your specific printer model script you're using.

I'm not sure what you mean when you say "instead of using the options with lp, where can i change the settings for page to put it A4 or A3 or the font size". Can you clarify?

If you don't want to specify the options on the command line, you could create a different script for each option you want, and hardcode the options in the script, for example the script "lpA3" would contain the command "lp -oA3". You could also create different queues for each option you want, and manually edit /var/spool/lp/interface/ to hardcode the options. I definitely wouldn't recommend doing this, however. Maybe someone else has a better way of doing this...

Are you adding these printers for users to print at the command-line, or for some application? Most applications allow you to specify options to lp in their printer definitions, so you could configure one print queue per physical printer at the UNIX level, and multiple queues within the application for each option you want to use. For printing at the command-line, your users will either have to specify the options each time, or remember which queue name uses which options if you set up multiple queues per printer. It's better to teach them the options than create a maintenance hassle for yourself...
Bill Hassell
Honored Contributor
Solution

Re: configuring a printer on hp-ux

Unfortunately, there are a far too many applications that do not allow for any options for the printing task. About all you can specify is the name o0f the printer.

However, because you're using JetDirect, it is really easy to create several print queues, each with a different set of options. Start by creating a standard queue for the printer. Since it is so simple, I just use addqueue. If you installed the HPPI product for JetDirect printers, your default PATH will have /opt/hpnpl/bin towards the end of the list. You add the printer like this:

addqueue -h 12.34.56.78 -q printer
addqueue -h 12.34.56.78 -q printerA4
addqueue -h 12.34.56.78 -q printerA3

It sounds like you want is a print queue that always selects the A4 printer tray and another always prints to the A3 tray. That will be easy.

cd to the interface/model.orig directory for lp. There will be 3 scripts in the model.orig directory, each with the name of the printer. Use vi to edit the file and look for the default settings section. You'll see a media source variable which you change from "" to "A3" in the printera3 script and "A4" in the printera4 script. No need to shutdown the spoolere, just print a simple test page to each queue to see that the new default works in each queue. Note that model.orig is for custom printer scripts. It's a good idea to document what you did for each qwueue.


Bill Hassell, sysadmin
Morcos
Super Advisor

Re: configuring a printer on hp-ux

Many thx for the information. I will let the thread opened in the case I'll need something.

Regards,
Ziad