1834178 Members
2778 Online
110064 Solutions
New Discussion

Re: lp

 
Danny Crisp
Frequent Advisor

lp

Are there any options using lp (if any) to rotate sheet, fit to page etc....
6 REPLIES 6
A. Clay Stephenson
Acclaimed Contributor

Re: lp

Those options are specific to the interface file that the print queue uses. The hp convention is to use the -o options lp argument to display the options or direct you to the appropriate man page.

e.g.

echo "Test" | lp -dmyprinter -o options

will print a list of option -- if the interface file conforms to HP conventions.

In general the answer to your question is no. Print formatting in UNIX is the responsibility of the application.
If it ain't broke, I can fix that.
Jeff_Traigle
Honored Contributor

Re: lp

Depends on the model script you're using. (Printers set up as "remote" printers will not give you the option.) If the script supports it, "-o portrait" and "-o landscape" will ritate the pages. Don't know of any fit-to-page option. Not documented anywhere since it's model script dependent. You just have to look through the script and see what's available.
--
Jeff Traigle
A. Clay Stephenson
Acclaimed Contributor

Re: lp

By the way, the best product I have found to do the kinds of things that you describe is Unform (www.unform.com).
If it ain't broke, I can fix that.
Bill Hassell
Honored Contributor

Re: lp

The lp command in HP-UX has a simple script that can do primitive formatting of ASCII text. So if the printer is either directly connected, or connected through a proprietary HP JetDirect LAN card, there are several options that can rotate text, change the font, change the spacing, etc. But fit-to-page is an enormously complex task. It requires analyzing the entire print job as to content, then adjusting the font to make the page fit. And even then, it would be limited to simple text--graphic images would be far too complex without a specialized formatting subsystem.


Bill Hassell, sysadmin
Mark Greene_1
Honored Contributor

Re: lp

If the files in questions are PostScript or are going to a PostScript-enabled printer, you can download Ghostscript:

http://hpux.connect.org.uk/hppd/hpux/PostScript/ghostscript-7.07b/

You can use GS to convert from PCL to PostScript as well.

mark
the future will be a lot like now, only later
Danny Crisp
Frequent Advisor

Re: lp

I have found a solution to this question