1833059 Members
2389 Online
110049 Solutions
New Discussion

Re: how to use "lp -o"

 
lin.chen
Frequent Advisor

how to use "lp -o"

I have a problem about print.
I want to print my files with some style or format(such as fonts,lines,etc)
It sames that "lp -o" can help me to do it.
But how to use lp -o?I can find little from "man lp".
could you give me some information about "lp -o" or you can provide some document.

thanks a lot!

Chen lin
3 REPLIES 3
Pete Randall
Outstanding Contributor

Re: how to use "lp -o"

You can do a "lp -ooptions" which will print out all the available options for you.

However, how your printer is defined/connected will have an impact on what you are able to do. If your printers are defined as "remote", being connected through another server, your options are severely limited. Local printers, attached directly to your server and network printers, defined with their own IP address offer the most flexibility.


Pete

Pete
A. Clay Stephenson
Acclaimed Contributor

Re: how to use "lp -o"

This is one of those "it depends" questions. By convention, you can issue an "echo 'test' | lp -dmyprinter -ooptions" and the printer will then print a list of available options -- or simply direct you to a man page such as "man net_lj4x". The list of -o options is actually unique to a given model script (interface file) and since the interface files can be customized, i they can even be unique to a given printer on a given system. You can examine the interface files in /var/spool/lp/interface for definitive answers although you may need to also look in the model.orig directory just below /var/spool/lp/interface.
If it ain't broke, I can fix that.
Bill Hassell
Honored Contributor

Re: how to use "lp -o"

lp can't tell you anything because all -o options are in the printer script, thus the -ooptions feature. For instance, you can do things like:

lp -olandscape /etc/profile
lp -o12 /etc/profile

HOWEVER: no -o options have any meaning if your printer is hosted on another system, especially Windows or other non-HP-UX boxes. You need to talk directly to the printer using an HP network card in the printer (aka, JetDirect card).


Bill Hassell, sysadmin