From owner-freebsd-questions@freebsd.org Tue May 5 16:19:55 2020 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C8DF813B7D5 for ; Tue, 5 May 2020 16:19:55 +0000 (UTC) (envelope-from vas@sibptus.ru) Received: from admin.sibptus.ru (admin.sibptus.ru [IPv6:2001:19f0:5001:21dc::10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49GlLL637Tz4BpV for ; Tue, 5 May 2020 16:19:54 +0000 (UTC) (envelope-from vas@sibptus.ru) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sibptus.ru; s=20181118; h=In-Reply-To:Message-ID:Subject:To:From:Date; bh=M3Lxga94OhJTqFZW+GHCaJpRuCWWpBWbBwRaD00x2HI=; b=ic6oriQ4c8NqWrB3/gm40dYKvU wbyNG5/YK2TU/NB7h6QHRobifK95bry/tRa8aLOFDauVLi2uViPRL9cj8yCmTrPVso+Vd18SWrLlj sy/Ve9ZnfuO+IUCTNpBihqdZxaLQidyKSbIMWDnpxRF41PgZYb7eDYoNe4SM7oV8LpGo=; Received: from vas by admin.sibptus.ru with local (Exim 4.93.0.4 (FreeBSD)) (envelope-from ) id 1jW0IS-0009D9-4z; Tue, 05 May 2020 23:19:52 +0700 Date: Tue, 5 May 2020 23:19:52 +0700 From: Victor Sudakov To: freebsd-questions@freebsd.org Cc: Polytropon Subject: Re: Brother HL-L2340D printer and lpd? Message-ID: <20200505161952.GA34844@admin.sibptus.ru> References: <20200503171259.GA48627@admin.sibptus.ru> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="envbJBWh7q8WU6mo" Content-Disposition: inline In-Reply-To: <20200503171259.GA48627@admin.sibptus.ru> X-PGP-Key: http://admin.sibptus.ru/~vas/ X-PGP-Fingerprint: 10E3 1171 1273 E007 C2E9 3532 0DA4 F259 9B5E C634 X-Rspamd-Queue-Id: 49GlLL637Tz4BpV X-Spamd-Bar: ------- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=sibptus.ru header.s=20181118 header.b=ic6oriQ4; dmarc=pass (policy=none) header.from=sibptus.ru; spf=pass (mx1.freebsd.org: domain of vas@sibptus.ru designates 2001:19f0:5001:21dc::10 as permitted sender) smtp.mailfrom=vas@sibptus.ru X-Spamd-Result: default: False [-7.31 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[sibptus.ru:s=20181118]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; RCVD_TLS_LAST(0.00)[]; SH_EMAIL_DBL_DONT_QUERY_IPS(0.00)[192.168.1.74]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[sibptus.ru:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[sibptus.ru,none]; SIGNED_PGP(-2.00)[]; FROM_EQ_ENVFROM(0.00)[]; SUBJECT_ENDS_QUESTION(1.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:20473, ipnet:2001:19f0:5000::/38, country:US]; RCVD_COUNT_TWO(0.00)[2]; IP_SCORE(-3.21)[ip: (-9.89), ipnet: 2001:19f0:5000::/38(-4.94), asn: 20473(-1.19), country: US(-0.05)]; SH_EMAIL_ZRD(0.00)[192.168.1.74] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 May 2020 16:19:55 -0000 --envbJBWh7q8WU6mo Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Victor Sudakov wrote: >=20 > 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: https://support.brother.com/g/b/faqend.aspx?c=3Dus&lang=3Den&prod=3Dhll2340= dw_us_eu_as&faqid=3Dfaq00100602_000 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:\ :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: while the ps2pcl.sh looks like this (thanks again to Polytropon): #!/bin/sh #/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. --=20 Victor Sudakov, VAS4-RIPE, VAS47-RIPN 2:5005/49@fidonet http://vas.tomsk.ru/ --envbJBWh7q8WU6mo Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJesZIoAAoJEA2k8lmbXsY0BGAH/09AxDJjuw1yLniR7ksGKWow D9Zqlf1tl/AhQ/O7seqcXwhXFqVw+57MJRpp6s4Bww3J+6kgvWNEb/dsHbj+zZBg fgdf3maGsGpr4TB4SebDZKktyYbcF7ocyHwQEaBTioYEiHLLse0unz39LM0NFr8L anxYBMFYxsUG/9RB1ds4V/bJiE8s/9BGbwZk6CCOxtFMwfRml5tmRBgJQT4S/bGF fTm3nrXB11u9Z7rE6NZ6h8Z4GAjKNlwisXaYei036iAjRYVI2FVqj6s2ThOcx0XM /nopLzf8ATlda9LMXLPP0307IFlQ/1CgZ2VSu7MgxlNihFvCb7pcrv4dLFPM3N8= =J97t -----END PGP SIGNATURE----- --envbJBWh7q8WU6mo--