Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 6 May 2020 21:55:39 +0700
From:      Victor Sudakov <vas@sibptus.ru>
To:        Steve O'Hara-Smith <steve@sohara.org>
Cc:        Polytropon <freebsd@edvax.de>, freebsd-questions@freebsd.org
Subject:   Re: Brother HL-L2340D printer and lpd?
Message-ID:  <20200506145539.GC83950@admin.sibptus.ru>
In-Reply-To: <20200506113009.GD77496@admin.sibptus.ru>
References:  <20200505185510.00b622e3.freebsd@edvax.de> <20200505180101.GA35751@admin.sibptus.ru> <20200505202242.c16f07feef5674fc7b6e6fe9@sohara.org> <20200506015935.GA56526@admin.sibptus.ru> <20200506071659.8730d1d68f9d47e4407790f3@sohara.org> <20200506102943.6f68ea4859f8de9661e25895@sohara.org> <20200506103620.f23dcb43f26697795686ee18@sohara.org> <20200506103026.GA74014@admin.sibptus.ru> <20200506120655.20c05800cda62c3887c0f4f9@sohara.org> <20200506113009.GD77496@admin.sibptus.ru>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help

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

Victor Sudakov wrote:
> > 	It looks like CUPS works by using an internal texttopdf converter
> > and feeding to to pdftops.
> >=20
> > 	Installing cups-filters (quite a small package) makes this work
> >=20
> > cupsfilter Documents/UTF-8-demo.txt > t.ps
> >=20
> > 	The resultant file views and prints fine.
>=20
> Dear Steve,=20
>=20
> You are a wizard! cupsfilter really works.
> "cupsfilter test.txt | lpr -P ps" printed a fine Cyrillic page for me.
>=20
> It seems that cupsfilter requires CUPS to be installed but it does not
> have to be running. I can live with that. I can probably use cupsfilter
> as a filter in printcap combining it with gs, to emulate a line printer.
>=20

So, my final working printcap looks this:


lp|Brother HL-L2340D series line printer:\
        :sh:\
        :lp=3D9100@192.168.1.74:\
        :if=3D/usr/local/etc/txt2pcl.sh:\
        :sd=3D/var/spool/output/lpd1:lf=3D/var/log/lpd-errs:


ps|Brother HL-L2340D series PostScript:\
        :sh:\
        :lp=3D9100@192.168.1.74:\
        :if=3D/usr/local/etc/ps2pcl.sh:\
        :sd=3D/var/spool/output/lpd2:lf=3D/var/log/lpd-errs:

The txt2pcl.sh filter looks this:

#!/bin/sh
exec 2> /dev/null
/usr/local/sbin/cupsfilter -i text/plain - |\
        /usr/local/bin/gs -q -dBATCH -dNOPAUSE -dPARANOIDSAFER -dSAFER \
        -sDEVICE=3Dhl1250 -sPAPERSIZE=3Da4 -r600x600 \
        -sOutputFile=3D- - && exit 0


Thanks again Polytropon, Steve and all who helped.


--=20
Victor Sudakov,  VAS4-RIPE, VAS47-RIPN
2:5005/49@fidonet http://vas.tomsk.ru/

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

-----BEGIN PGP SIGNATURE-----

iQEcBAEBAgAGBQJess/rAAoJEA2k8lmbXsY0BaYIAKBdDs/y1MJUJimUkDApqnWX
neHEQzsJuG4cC6t1IpXAeP8o96UO62GH5FKbsoBner/DNvR+2qnPdKiY3TRDQCeq
Ti6Hk2MhkSwTKzhUHFH5V+HDRhyOaWrjlgrsotDi0jT4aQsHVEEkzpH3o8IA5U+a
AG7uLTRz5ojoM5Kz+J90fgzcJJfa4K8amxl896AGS1NzLB7YfKlXYmHK22BiJzJa
c8Zy4mSltblX+Q7jFxtlkX/VCePEvz2Z6flZ8eG+QgRiHDyU+in7SszJrxV51AQo
WMRBBu9pd0HXfmQaUVYjWpuHJp6S9C4hJ2AIfc1bh/L38lJb+5cfrQ0Sn/QGyeU=
=mdrU
-----END PGP SIGNATURE-----

--neYutvxvOLaeuPCA--



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?20200506145539.GC83950>