Brother HL-L2340D printer and lpd?

Victor Sudakov vas at sibptus.ru
Wed May 6 14:55:42 UTC 2020


Victor Sudakov wrote:
> > 	It looks like CUPS works by using an internal texttopdf converter
> > and feeding to to pdftops.
> > 
> > 	Installing cups-filters (quite a small package) makes this work
> > 
> > cupsfilter Documents/UTF-8-demo.txt > t.ps
> > 
> > 	The resultant file views and prints fine.
> 
> Dear Steve, 
> 
> You are a wizard! cupsfilter really works.
> "cupsfilter test.txt | lpr -P ps" printed a fine Cyrillic page for me.
> 
> 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.
> 

So, my final working printcap looks this:


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


ps|Brother HL-L2340D series PostScript:\
        :sh:\
        :lp=9100 at 192.168.1.74:\
        :if=/usr/local/etc/ps2pcl.sh:\
        :sd=/var/spool/output/lpd2:lf=/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=hl1250 -sPAPERSIZE=a4 -r600x600 \
        -sOutputFile=- - && exit 0


Thanks again Polytropon, Steve and all who helped.


-- 
Victor Sudakov,  VAS4-RIPE, VAS47-RIPN
2:5005/49 at fidonet http://vas.tomsk.ru/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 455 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20200506/544acdf3/attachment.sig>


More information about the freebsd-questions mailing list