Operating System - HP-UX
1834462 Members
3204 Online
110067 Solutions
New Discussion

Re: Unix Script for changing printer to Landscape

 
SOLVED
Go to solution
alana duvall_1
Occasional Contributor

Unix Script for changing printer to Landscape

How can I write a Unix Script to change Orientation of a printer and font size. I am using a HP8100. Currently I have to manually change the default settings on the Printer whenever I want to print from the UNIX command line. Then change them back when I'm done printing.

Thanks for your input
5 REPLIES 5
John Poff
Honored Contributor
Solution

Re: Unix Script for changing printer to Landscape

Tony,

I do it with a switch for lp:

lp -dPRINTER -o landscape print_file

I can also do legal paper that way:

lp -dPRINTER -o landscape -o legal another_print_file

Alan Riggs
Honored Contributor

Re: Unix Script for changing printer to Landscape

You just need to supply the command line options to lp that you wish. These will be specified in teh model script: /etc/lp/interface/ for local printers, /etc/lp/interface/model.orig/ for network printers. Generally, -landscape is the HP printer option for landscape mode.

lp -d -o landscape FILE
alana duvall_1
Occasional Contributor

Re: Unix Script for changing printer to Landscape

Thanks it worked. But how do you change font size?
Jordan Bean
Honored Contributor

Re: Unix Script for changing printer to Landscape

`lp -d -ooptions` should tell you what formatting options are supported by the interface script.
Alan Riggs
Honored Contributor

Re: Unix Script for changing printer to Landscape

font varies from printer to printer (including what pitches the printer can render).

You might try
-ofp10
-ofp12
-o10
-o12