1833921 Members
4531 Online
110063 Solutions
New Discussion

lp

 
trystan macdonald
Occasional Advisor

lp

Hi,
Does any one know how to print in landscape using the standard lp command. I have looked everywhere in the man pages without success.
Thanks,
Trystan
6 REPLIES 6
S.K. Chan
Honored Contributor

Re: lp

Try ..
$ lp -d -olandscape
Pete Randall
Outstanding Contributor

Re: lp

Trystan,

In theory, at least, the command would be "lp -o land".

Pete

Pete
John Poff
Honored Contributor

Re: lp

Hi Trystan,

It depends on the model script for the printer, but if you are using an HP LaserJet you should be able to do this:

lp -dprinter -o landscape somefile

JP
Pete Randall
Outstanding Contributor

Re: lp

Probably without the space between o and land, lp is funny about that sometimes.

Pete

Pete
MANOJ SRIVASTAVA
Honored Contributor

Re: lp

If you printer interface supports , then you need to use

lp - o landscape < file name >



Manoj Srivastava
doug hosking
Esteemed Contributor

Re: lp

As previously noted, the printer model scripts have usage information. Often this printed on the header sheet of print jobs. If you look in the directory /usr/lib/lp/model (/usr/spool/lp/model on some systems) you will find a script for each of many models of printer that is supported. Look for the one that most closely matches your printer, and view that file with more, vi, etc. You will see more options than you ever wanted.

Looking at the script for a Laserjet 5 si, for example, there is a line:
-land | land | -landscape | landscape) # select landscape orientation

that shows that 'lp -o landscape' or minor variations of that selects landscape orientation. These can vary a bit from release to release, so check the file on your system for the definitive answer for your printer.


The reason these are not in the manual pages is that some of the options vary from model to model.