Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 4 May 2020 08:38:46 +0200
From:      Polytropon <>
To:        Victor Sudakov <>
Subject:   Re: Brother HL-L2340D printer and lpd?
Message-ID:  <>
In-Reply-To: <>
References:  <> <> <>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
On Mon, 4 May 2020 01:47:09 +0700, Victor Sudakov wrote:
> Polytropon wrote:
> > On Mon, 4 May 2020 00:12:59 +0700, Victor Sudakov wrote:
> > > Dear Colleagues,
> > > 
> > > I'm trying to use a Brother HL-L2340D printer as a simple networked
> > > line printer with lpd. I've successfully used HP and Canon printers like
> > > that with a simple printcap like this:
> > > 
> > > # by VAS
> > > lp|Brother HL-L2340D series:\
> > >         :sh:\
> > >         :rp=TEXT_P1:\
> > >         :rm=
> > > 
> > > but the story with Brother HL-L2340D is different. When fed some input 
> > > with "lptest |lpr", it just spits out 3 empty pages. I've never seen
> > > anything like that before.
> > 
> > It's possible that your previous printers could understand
> > regular (unformatted) ASCII text, but the new one doesn't.
> I've never seen a network printserver (and I've seen a few) which would
> not understand plain ASCII text. I did not even imagine that such an
> abomination is at all possible.

It's the common situation for inkpee printers (or anything that
is "consumer-oriented"). Office printers usually speak PS and PCL,
and modern ones speak PDF. For processing text, they need some
internal fonts. Maybe it was cheaper to get rid of the little
text font engine?

> It's true, I've heard about GDI winprinters with LPT interfaces,
> but a networked printer? 

I can just imagine that "cost reduction" and "leave out all the
things our users aren't going to use" have been strong drivers in
constructing that printer... :-)

> > > I'm wondering if someone has this printer and made it work as a line
> > > printer.
> > > 
> > >  From the specification at
> > >
> > > it should support LPD.
> > 
> > It's not a matter of supporting LPD - it's the question which
> > printer language the printer can process. The default output
> > format for programs is PS. According to the above specification,
> > the printer does not understand PS. However, it supports PCL,
> > and tools like gs (GhostScript) should be able to convert PS
> > to PCL. This is what you need to send to the printer.
> Indeed, it probably does not understand PostScript, though it does have
> a PostScript queue for some reason.
> But what's the point of running an LPD server on port 515/tcp and not
> understanding ASCII text? LPD is an acronym of "Line Printer Daemon"
> BTW. The text queue is here:

You see, it's got a web interface, and to make room for that,
something else had to be removed. ;-)

Some printers are abre to "switch personality" depending on
the input they receive, i. e., when you send PS, they start
interpreting it with their internal PS processor, but when
you send PCL, they handle it accordingly, and for ASCII text,
they use the default fixed-width font and just print it.
For some models, this personality can be explicitely chosen
by the user by addressing a specific TCP port for each type
of input.

For your printer, sending PCL to port 9100 of its IP should
probably be the easiest thing. Let system's lpd manage the
printer queue locally.

> > I assume you're not using CUPS? In this case, a PPD file for
> > this printer would probably be the easiest thing, but you can
> > get around using CUPS of course.
> No, I don't use CUPS, I think it's a monster.

I can fully understand that statement. :-)

> > Maybe this example can help:
> > 
> > First verify that the printer really understands PCL. You can
> > use nc (netcat) to send it some data directly. If it works,
> > instantiate a simple printer filter in /etc/printcap, for example:
> Could you please generate a small one-page PCL file for me so that I
> could test it? I suppose I should netcat it to the 9100 (raw) port, right?

Correct - and by the way, that's the typical way of doing
printer diagnostics. You prepare some input, usually PS, PCL,
ASCII, PDF, and then send it directly to the printer. If it
is any good, it should at least understand _one_ format.

The PCL is non-ASCII, so I will send it offlist.

Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...

Want to link to this message? Use this URL: <>