Subject: Re: Problem with CR/LF Printing Text to HP LaserJet--Progress
To: None <skidmore@macconnection.net>
From: Robert Elz <kre@munnari.OZ.AU>
List: netbsd-users
Date: 10/22/2003 12:33:22
    Date:        Tue, 21 Oct 2003 19:35:18 +0000
    From:        skidmore@macconnection.net
    Message-ID:  <20031021193518.GA1464@macconnection.net>

  | I did forget the ending newline.  Here is the complete printcap entry:
  | 
  | 
  | lp|local line printer:\
  |         :sh:\
  |         :if=/usr/libexec/filters/hpif:
  |         :lp:rm=xxx.xxx.xxx.xxx:rp=lj:sd=/var/spool/lpd/lp:\
  |                   ^^^^^^
  |                printer ip here

You need a \ at the end of the :if=... line, you don't need one at the
end of the :lp:... line  (a \ is needed at the end of every line but
the last one).

That is causing the rm rp & stuff to be ignored, so it is trying to
use a local printer - which is why it is wanting /dev/lp* stuff.

But just fixing this will just get you back to the way you had it before
I believe.

You are going to need 2 printcap entries.  The first has filters,
and lp=/dev/null or something like that.

The filter does the conversion required (runs hpif for you), and then
pipes the results of that into lpr -Preal-printer

The second (called real-printer in the previous line - the name itself
doesn't matter, as long as it differs from the first) has the kind of
setup that you now have, with rp and rm and stuff, and results in the
file being transmitted to the printer.

You don't need MAKEDEV or anything related to devices.   Magicfilter
may help with format conversions, but I doubt it will help with getting
them applied and working to talk to a remote net printer on NetBSD.

And NetBSD people, we're doing a lousy job of assisting here, as people
aren't bothering to understand the problem before replying.

kre