1752799 Members
5877 Online
108789 Solutions
New Discussion юеВ

lp command options...

 
SOLVED
Go to solution
Brian Taylor
Advisor

lp command options...

A question for the collective...

A former admin here set up aliases for a few printers in the format of :

lp -o c -o landscape -o lpi8 -d printername

We are getting every other page as a blank page.

The 'landscape' is obvious, the 'c' seems to compress the text but what does the 'lpi8' mean and what other options do I have there?

Thanks,

Brian
4 REPLIES 4
Rita C Workman
Honored Contributor

Re: lp command options...

lines per inch=8 if memory serves me right..


/rcw
Rodney Hills
Honored Contributor

Re: lp command options...

lpi8 is 8 lines per inch.

You can also use -o vsi# where # is #/48ths of inch vertical spacing.

You may want to look at the -o tl# to set the text length per page (in lines).
There be dragons...
Denver Osborn
Honored Contributor

Re: lp command options...

If this printer was setup using JETADMIN, there should be a man page for the model script.

# cd /etc/lp/interface/model.orig
# grep Header printer_name
Look for the entry similar to:
/users/hpnp/odyssey/repository/sh/net_lj4x.psh -> net_lj4x is the man page to view.

using "man net_lj4x" from the above example would give all the available options for that jetadmin model script.


Hope this helps
-denver
Bill Hassell
Honored Contributor
Solution

Re: lp command options...

The blank page is caused by the spacing (-o lpi8) which will vary on different printers. It is an old option designed for LaserJet I and II where there were no such things as downloadable fonts and variable line spacing. The days of a fixed number of lines per page went out with the greenbar paper and impact printers.

With today's LaserJets, there are some default font values but since printers have changed resolution (150,300,600 and now 1200 dpi), the exact shape (width/height) won't be quite the same.

The good news is that you can adjust just about everything for fixed spacing fonts. The horizontal inter-character spacing is called horizontal spacing increment, and similarly for vertical spacing. The options are -ohsi and -ovsi.

For example:

lp -ohsi9

or

lp -ovsi4

Of course, you'll have to adjust the values to suit your specific printer. The increments are 64th's of an inch and the values can be specified as fractions is needed:

lp -ovsi3.7 -ohsi4.1

and can be combined with options like -o10 or -o12 or even -oc. The options are described in the man pages for net_lj4x. If you don't have JetDirect software installed, these man pages will be missing. In that case, use lp -ooptions to produce a one page summary. And you can always read the (lengthy) printer script.

When you test, be sure to use lp -onb and print something small (one page) like .profile to save paper.


Bill Hassell, sysadmin