Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 May 2020 23:19:52 +0700
From:      Victor Sudakov <>
Cc:        Polytropon <>
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

Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Victor Sudakov wrote:
> 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:

The story continues with some good news.

Thanks to much insight and help from Polytropon (off list also), and
this page:

I've been able to print PDF files (lpr -P ps mozilla.pdf)=20
on this printer with the following printcap entry:

ps|Brother HL-L2340D series PostScript:\

while the looks like this (thanks again to Polytropon):


#/usr/bin/printf "\033&k2G" || exit 2
/usr/local/bin/gs -q -dBATCH -dNOPAUSE -dPARANOIDSAFER -dSAFER \
        -sDEVICE=3Dhl1250 -sPAPERSIZE=3Da4 -r600x600 \
        -sOutputFile=3D- - && exit 0
exit 2

So GhostScript's "hl1250" driver works wonders, I even see Cyrillic
text in the printed PDF.

Now two questions are left:

1. How the heck do I print text files with this setup? Should I convert
them to PostScript first, and how? UTF-8 Cyrillic support is crucial.

2. How do I convince Mozilla Firefox that I now have a PostScript
printer and it can print directly to it, not just to a PDF file? It does
not seem to care for /etc/printcap.

Victor Sudakov,  VAS4-RIPE, VAS47-RIPN

Content-Type: application/pgp-signature; name="signature.asc"




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