Operating System - HP-UX
1832759 Members
2986 Online
110045 Solutions
New Discussion

Re: Another printing problem

 
Jonathan Caplette
Regular Advisor

Another printing problem

Hi guys!!!

I have to print a text file, but I need to print it landscape. So I used the command:
lp -d -olandscape
It have printed landscape, but the caracter size is to big, cause not everything that I have on the page fit on it... So I want to use escape code, I think in Unix is "~E" but where should I wirte those???

Help please...
Thanks...
Jon
9 REPLIES 9
A. Clay Stephenson
Acclaimed Contributor

Re: Another printing problem

Hi Jonathan:

The best answer is to modify the interface file. Cd to /var/spool/lp/interface. Look for the file 'printername'; it's just a script. I suspect there is already an option for font size or compressed; if not simply add on along with the others. You would then invoke it like
lp -dmyprinter -o landscape -o compressed myfile.

The interface file may be continued in a directory just below called 'model.orig' so check there as well. This is really quite easy.
If it ain't broke, I can fix that.
S.K. Chan
Honored Contributor

Re: Another printing problem

I used to use the option "pitch" to control the size of the font.
eg:
lp -d -olandscape -o"-pitch 17.5" filename

The higher the value of -pitch the smaller the font. I dunno if this will work for you.
Sachin Patel
Honored Contributor

Re: Another printing problem

cat filename |lp -o2+ -d

Sachin Patel
Is photography a hobby or another way to spend $
D. Jackson_1
Honored Contributor

Re: Another printing problem

You may also give this a try:
lp -d -olandscape -ofp8 /filename

Good luck.
Roger Baptiste
Honored Contributor

Re: Another printing problem

hi,

Add -oc to your printer command.

Even, this works fine:
lp -d -oc -o2

HTH
raj
Take it easy.
Rodney Hills
Honored Contributor

Re: Another printing problem

If you add the following case options into /usr/spool/lp/model.orig/yourprinter

lpr) # setup for 132 col by 66 row landscape
orientation="l"
pitch="c"
hsi="9"
vsi="5"
textlen="66";;

std) # setup for 96 col by 66 row portrait
orientation="p"
pitch="12"
vsi="7"
textlen="66";;

after the landscape) case option, then you can enter

lp -olpr printfile

to print legacy standard 66 lines on a landscape page (-ostd for portrait). This will also fit the legacy standard of 132 columns.

-- Rod Hills
There be dragons...
D. Jackson_1
Honored Contributor

Re: Another printing problem

Oops

lp -d -ofp12 -olandscape /filename - will give smaller font.
Frank Slootweg
Honored Contributor

Re: Another printing problem

You did not mention which printer or/and model script you use.

If you use an HP(-compatible) printer and associated model script, then you can probably use "lp -ooptions file" to *print* a summary of the available options for that model script ("options" is the *literal* word "options", "file" is the name of any (dummy) file).
Jonathan Caplette
Regular Advisor

Re: Another printing problem

Ok guy thanks... It have worked good with the options you specified me, but the problem was, I found out, an application probleme, seems lkie it was the application that my users was running that don't take the options of the command line...

Thanks,
ciao!