Operating System - HP-UX
1825011 Members
4712 Online
109678 Solutions
New Discussion юеВ

How to print in landscape format using 'lp' command

 
Marko_3
Contributor

How to print in landscape format using 'lp' command

Dear all

How can I print my document via 'lp' command to a laser printer and the output is in landscape format?

If this is not possible, do I have to embed control characters at the top of the document to force the printer to print the subsequent in landscape format? How is the control character like?

Thanks in advance
6 REPLIES 6
Denver Osborn
Honored Contributor

Re: How to print in landscape format using 'lp' command

Try using lp -dprinter_name -olandscape
Dyi-Wu Liu_1
Occasional Advisor

Re: How to print in landscape format using 'lp' command

Have a try on this to print out the /etc/issue
file in landscape mode

$ lp -olandscape /etc/issue

:-)
loves discipline loves knowledge
federico_3
Honored Contributor

Re: How to print in landscape format using 'lp' command


Insert the following alias in your .profile :

alias lpl="lp -d printer-name -olandscape"

this way when you need to printer in landscape format you can use:
lpl file

federico
Stefan Schulz
Honored Contributor

Re: How to print in landscape format using 'lp' command

the -olandscape is the right modifyer. If thsi doesn't work you have probably your printer as a "raw" printer.

In this case all -o options are ignored and you have to use control characters at the top of the document.

Consult your printermanual for a reference of these characters. They depend on make and model of your printer.

Regards Stefan
No Mouse found. System halted. Press Mousebutton to continue.
rbiorn
Advisor

Re: How to print in landscape format using 'lp' command

Some years ago I made two scripts to handle "raw"-printers (landpr and portpr). The script landpr is attached.
The script also prints a header with date, username, hostname, filename and pagenr.
Read the script, and you can easily make a similar script for the port-orientation.

Syntax: landpr
To print the result of a command the syntax is:
| landpr

Have a nice day!
Ragnar
"You cannot achieve anything beyond your wildest dreams --- if you don't have any wild dreams"
Bill McNAMARA_2
Occasional Advisor

Re: How to print in landscape format using 'lp' command

for general safe keeping... on the related topic:
DO THIS:

ioscan -fnk| lp -onb -o12 -olandscape

-onb (no banner) --- you're root

-o12 (font size 12 - depends on printer)

-olandscape (note NO spaces)