1829539 Members
2874 Online
109992 Solutions
New Discussion

Re: lp ouput incorrect

 
SOLVED
Go to solution
Jeff Hoevenaar
Frequent Advisor

lp ouput incorrect

Trying to print a text file (i.e. hosts) using the lp command on a RedHat AS3 server.

lp /etc/hosts

The printout comes out incorrect.

Example:

10.10.10.1 host1
10.10.10.2 host3


Any idea how I fix this?

Thanks.
5 REPLIES 5
Vipulinux
Respected Contributor

Re: lp ouput incorrect

Hi
What is the output when you try:

cat /etc/hosts | lp

Cheers
Jeff Hoevenaar
Frequent Advisor

Re: lp ouput incorrect

my message above did not quite come out the way i wanted to look

the lines are staggard and they print off the page - not in a column
(like above)
Rick Garland
Honored Contributor

Re: lp ouput incorrect

Sounds as if you are stair-stepping.
Typically this is an incorrect driver is use.

Ivan Ferreira
Honored Contributor
Solution

Re: lp ouput incorrect

The sample you posted does not shows the problem. It should be the staircase problem. Red Hat has the option in system-config-printer to add carriage return to the printer, or choose another printer driver, maybe the printer itself has an option to translate LF to CR-LF.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Jeff Hoevenaar
Frequent Advisor

Re: lp ouput incorrect

Thanks - I got it.

using this command line to create print queue:

lpadmin -p cmdcpr01 -E -v lpd://192.239.1.10/raw -m textonly.ppd


"textonly" was the key