1838642 Members
2228 Online
110128 Solutions
New Discussion

Re: LP

 
Osama88
Occasional Advisor

LP

Hi all,

I am having problems with printing text file to my printer. The printer attempts to print everything in one line. What I get from cat /etc/profile | lp
is only the top-line of the file.
However if I do this a2ps -1 -o - /etc/profile | lp
everything works like a dream.

What I need from the printer is the ability to print ASCII Text Files as well as Rich Text Files

The printer was configured using SAM (HP-UX 11) to print to a HP8000 via LPD.

Rgds
4 REPLIES 4
Olav Baadsvik
Esteemed Contributor

Re: LP


Hi,

Your problem is probably caused by the
differenece in line-termination in the
PC-world and the UNIX-world.
Your printer expects cr-lf (carriage-return
and linefeed) to make a newline.
UNIX has only lf as line-termination.
Check if your printer can be configured to
automatically add a carriage-return when
it gets a line-feed. Most printers have
this ability.
If not I will need more info about how your
printer is set. If it is set up as a remote
printer, a small change in the interface
script will fix the problem.

Regards
Olav
Steve Steel
Honored Contributor

Re: LP

Hi

If ux2dos /etc/profile|lp
works

Then olav is completely correct.


Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
Niraj Kumar Verma
Trusted Contributor

Re: LP

Hi,

Look at the followin two files

/etc/lp/interface/

/usr/lib/lp/

I thing you need to do a little changes in the printer cionfig file.


-Niraj
Niraj.Verma@philips.com
Wodisch
Honored Contributor

Re: LP

Hello Mike,

consider using JetAdmin zu access that printer, as it has a built-in JetDirect interface , and using JetAdmin (free from HP) you can change settings like PostScript-Auto-detect, and such... And you will get rid of the line-end problem.

HTH,
Wodisch