Operating System - HP-UX
1822582 Members
3550 Online
109643 Solutions
New Discussion юеВ

Re: Problem printing landscape...

 
SOLVED
Go to solution
jmckinzie
Super Advisor

Problem printing landscape...

I am having users who need to print landscape but cannot...however, i do not even know where to begin.

Any ideas would be great.

Thanks,

17 REPLIES 17
Pete Randall
Outstanding Contributor

Re: Problem printing landscape...

A great place to begin would be to tell us about your system: The O/S and version, the hardware model, the type of printers and how they are defined (local, remote, network). The more info you can give, the better we can help.


Pete

Pete
A. Clay Stephenson
Acclaimed Contributor

Re: Problem printing landscape...

It all depends upon the printer's interface file but, in general, it's no more difficult than
lp -dmyprinter -o landscape myfile

Use a text editor to examine /var/spool/lp/interface/myprinter (and if this a network printer) also look at /var/spool/lp/interface/model.orig/myprinter to see the options that this interface file supports.
If it ain't broke, I can fix that.
A. Clay Stephenson
Acclaimed Contributor

Re: Problem printing landscape...

Oh, and if this is printing from an application (so that adding a -o landscape is difficult), one option is create another print queue for the same physical printer and edit the interface file so that the landscape option is always true.
If it ain't broke, I can fix that.
jmckinzie
Super Advisor

Re: Problem printing landscape...

I am runing HP7410 HW with HP-UX11.11.
These are network printers...
jmckinzie
Super Advisor

Re: Problem printing landscape...

I am trying to edit /var/spool/lp/interface for landscape but cannot find any option for landscape. I have attached a copy of my /var/spool/lp/interface/4A042(printer-name) config file.

Do i add it in this file?

If so, where?

THanks,
A. Clay Stephenson
Acclaimed Contributor

Re: Problem printing landscape...

If they are "Network" printers as opposed to "Remote" printers (in HP-UX speak), then this should be duck soup. Just follow my instructions above. Almost all of the HP model scripts support the -o options option so:
echo "Test" | lp -dmyprinter -o options

will print a list of available options or direct you to a man page for the same thing.
If it ain't broke, I can fix that.
jmckinzie
Super Advisor

Re: Problem printing landscape...

This is printing from an application where the -o is not an option for the users so, i must specify it in the printer definition file.

Any ideas?
A. Clay Stephenson
Acclaimed Contributor

Re: Problem printing landscape...

You lied. This is a "Remote" printer rather than a "Network" printer. You have far less direct control over remote printers. I would first try to set this printer up as a Network printer (ie, one that uses HP's JetDirect protocol).
If it ain't broke, I can fix that.
jmckinzie
Super Advisor

Re: Problem printing landscape...

It is setup via jet direct and I can print to it...just not landscape format.
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: Problem printing landscape...

Ooops, sorry you didn't lie; I'm an idiot; this is a Network printer but you need to look in the model.orig directory just below for a script with the same name and there the options will be.

There is probably a line like:
orientation="def"
change it to:
orientation="l"

I would actually create another printer using hppi and then edit this printer's file in model.orig to set the default orientation to "l".

If it ain't broke, I can fix that.
jmckinzie
Super Advisor

Re: Problem printing landscape...

ok, now i got it to print landscape...but now the font is all messed up.

Any ideas?
A. Clay Stephenson
Acclaimed Contributor

Re: Problem printing landscape...

The concept is exactly the same except now you look for "pitch"; you might try pitch="c" for condensed. The interface file is nothing but a shell script; you should be able to figure this out for yourself --- and allow yourself to "grow".
If it ain't broke, I can fix that.
jmckinzie
Super Advisor

Re: Problem printing landscape...

Ok, thanks...I am growing already!

I found it and really appreciate the help.
jmckinzie
Super Advisor

Re: Problem printing landscape...

Ok,

Now we have a spacing issue...

It seems that everyline has a space before and after it so it wont print everything on one page so,

by trying to "grow" i looked for spacing and changed it from

spacing="def"
to:
spacing="0"


However, this did not work....
Which variable do i change in order to make no spaces in the document and how would i know to use it?

For instance, def seems to be used for the meaning default however it being a string means that it doesn't have to be "defined"

If spacing="def" and "def" is not defined, exactly what does spacing equate to?

Thanks in advance...
A. Clay Stephenson
Acclaimed Contributor

Re: Problem printing landscape...

I am intentionally not directly going to answer your question (because maybe I ain't smart enough or maybe I have other reasons - you figure that out) but I will show a technique that allows you to get to where you want to go much faster.

1) Have your application output to a file (or if that's difficult, modify the interface file in the directory above model.orig where hpnpf is called and have it also output to a file) e.g. /var/tmp/myfile)

2) Now using your original unmodified print queue (or create a new one for this purpose so that you are starting from scratch),
lp -dmyprinter -o options /var/tmp/myfile

This will either print the supported options or direct you to a man page for the supported options.

3) Now try some of the options:
lp -dmyprinter -o landscape -o fp9 /var/tmp/myfile

adding, changing, the -o values until you get the desired output

4) Finally modify your model.orig/myprinter interface file to automatically assert these options.

5) Declare victory.

------------------------------------------

Fighting printers is one of those things that every admin has to do at some point so you might as well gird up your loins and do it now.

If it ain't broke, I can fix that.
Bill Hassell
Honored Contributor

Re: Problem printing landscape...

The two most useful options in fitting text to a page are hsi and vsi (horizontal and vertical space increment). Because today's printers are page printers (not line printers), spacing is completely tunable. And to clarify terminology, horizontal spacing (between the letters) is called kerning while vertical spacing betwween lines is called leading (after the metal lead used in metal typesetters.

First, create a file that has just the text you need to test the script on one page, two pages at most. Then rather than modifying the script, use the -ovsi and -ohsi values with the lp command. Once they look OK, then plug the values into your script. The hsi and vsi values are real numbers, that is, they can be fractional. Try values like -ovsi6.5 -ohsi7.5 and see what happens. A very small hsi will cause the letters to squish together and overlap, while a small vsi will make each line closer together (more lines per page).

There are general options like lines per page which can be frustrating to use. It's much easier to fine tune using the motion increments. Note that all lasewr printers will automatically eject the paper when any part of the next line extends below the bottom printable area. If your application tries to control the page length, you'll need to adjust line spacing (-ovsi) to keep lines from jumping to the next page.


Bill Hassell, sysadmin
jmckinzie
Super Advisor

Re: Problem printing landscape...

Thanks to all.