Operating System - HP-UX
1834804 Members
2325 Online
110070 Solutions
New Discussion

Re: RE: Margins on printer output

 
SOLVED
Go to solution
jok llamera
Advisor

RE: Margins on printer output

hi guys,

What should I do(on the OS level) to accomodate an 11" x 15" report size to be printed on a A4 paper size.

jok
Excelence is not an act but a hobby
2 REPLIES 2
MANOJ SRIVASTAVA
Honored Contributor

Re: RE: Margins on printer output

Hi Jok

On the OS level what you are looking forward is compression of the characters or resucing spaces between then so that you can accomodate bigger size print out on a smaller paper . Essentially for formatting I think it will cumbersome on the OS level , but there are some tools or third party software which can handle this for you . Try downloading LP Plus and installing it on the server , it should help you .Go to http://www.stokely.com/unix.sysadm.resources/printing.html#uprint

for more these products.

Manoj Srivastava
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: RE: Margins on printer output

Hi Jok,

You didn't mention printer types so I have to be very general. In some cases, you can't because the printer itself doesn't support the needed functionality but in most cases you can do this.

cd to the /var/spool/lp/interface directory.
For each queue (e.g. myprinter1) there will be an interface file called myprinter1 and in many cases there will be another interface of the same name in a directory called model.orig located just below /var/spool/lp/interface.

The convention is that lp invokes /var/spool/lp/interface/myprinter1 to actually print the file. The interface is almost always
a shell script but can be any executable as long as the proper conventions are followed.
All you have to do is modify the existing interface file to add options that you want.
In many cases, paper size, font, boxes, etc. are already in the interface but sometimes you have to create them yourself.
You then invoke lp as you would normally but with additional -o options.
e.g. lp -dmyprinter1 -opaperxx myfile

You would have modified myprinter1's interface file(s) to handle the newly created 'paperxx' option. You will need some knowledge of the printers language (PCL,postscript,etc.) to make these changes.

Man lp and lpadmin for details but above all
examine the interface files themselves - the functionality may already be there. Most interface files have an option to print all the other options on a banner page (usually invoke lp with a -ooptions argument).

Hope this gets you started, Clay
If it ain't broke, I can fix that.