Discussion Locked

lp command

0 helpful
9 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hi,

I use lp to print files. I found out that if line exceed physical length on the paper it would be truncated instead of wrap around. I tried to use width option but get an error message as follow:

***
==>lp -owidth=132 test
UX:lp: ERROR: The following options can't be handled:
-o width=
TO FIX: The printer(s) that otherwise qualify
for printing your request can't handle
one or more of these options. Try
another printer, or change the options.
***

Any suggestions?
BTW, when I use man page, it does not accept vi command. I recalled when I used AIX work station, it worked fine. I use DYNIX thru NetTerm right now. I am not sure it's something to with term type or OS.

Thanks, Andy

9 replies

by djudice

Try a space between the -o and width:
lp -o width=132 test

According to my Unix documentation there should be a space. It might require it.

by ustutz

1) Which OS are you on?

2) For a quick fix try
cat test | lp

3) Don't use "test" as a file name - it is actually a UNIX command. A file named "test" can have unpredictable results.

4) The point about the space: On HP-UX lp related commands require different spacing than on other UNIX flavors (hence the "Which OS" question). However, your machine does recognize your command, since it tells you
"-o width=" is not supported
(not "-owidth="). I suspect you are trying to print to a laser printer? Which does not support 132 wide carriage paper?

by notreallyoriginal

Line length and handling is also a function of the printer. Thumb through your printer manual for the settings to see if you can wrap a line or just have the printer truncate it. I used to deal with high volume Printek printers on an HP9000 with forms and we had to turn ON truncation because the alignment would get all messy if a line wrapped.

by mondick

First, try a space after the -o - this might clear it up. And second, what flavor/version of UNIX are you using?? Third, you should check the printer set up. It's posible that it may be set up with less lines.

Hope this helps.

This discussion is closed to new replies.