From owner-freebsd-current@FreeBSD.ORG Wed Jun 9 10:01:49 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9113616A4CE for ; Wed, 9 Jun 2004 10:01:49 +0000 (GMT) Received: from smtp.infracaninophile.co.uk (ns0.infracaninophile.co.uk [81.2.69.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1CDA243D5C for ; Wed, 9 Jun 2004 10:01:48 +0000 (GMT) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost.infracaninophile.co.uk [IPv6:::1])i59A0QUT012986 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 9 Jun 2004 11:00:26 +0100 (BST) (envelope-from matthew@happy-idiot-talk.infracaninophile.co.uk) Received: (from matthew@localhost)id i599wuFw012950; Wed, 9 Jun 2004 10:58:56 +0100 (BST) (envelope-from matthew) Date: Wed, 9 Jun 2004 10:58:56 +0100 From: Matthew Seaman To: James Horvath Message-ID: <20040609095856.GB12520@happy-idiot-talk.infracaninophile.co.uk> Mail-Followup-To: James Horvath , freebsd-current@freebsd.org, 'James Horvath' References: <20040608230421.5A97B43D49@mx1.FreeBSD.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="LyciRD1jyfeSSjG0" Content-Disposition: inline In-Reply-To: <20040608230421.5A97B43D49@mx1.FreeBSD.org> User-Agent: Mutt/1.5.6i X-Greylist: Message not sent from an IPv4 address, not delayed by milter-greylist-1.3.8 (smtp.infracaninophile.co.uk [0.0.0.0]); Wed, 09 Jun 2004 11:00:27 +0100 (BST) X-Virus-Scanned: clamd / ClamAV version devel-20040604, clamav-milter version 0.71c on smtp.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, hits=-4.8 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on happy-idiot-talk.infracaninophile.co.uk cc: freebsd-current@freebsd.org cc: 'James Horvath' Subject: Re: Print issues from ghostscript X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jun 2004 10:01:49 -0000 --LyciRD1jyfeSSjG0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jun 08, 2004 at 04:00:21PM -0500, James Horvath wrote: > FreeBSD 5.1, just installed ghostscript-gnu-nox11 from ports and accepted > all default devices. >=20 > The system prints fine if I try something like: >=20 > # lp -dprinter /etc/printcap >=20 > But will not print if I try: >=20 > # gs -q -dNOPAUSE -sDEVICE=3Dljet4 -sOutputFile=3D\|lp -dprinter ./file.p= s -c > quit >=20 > I get the following: >=20 > lpr: lp: unknown printer >=20 > "printer" is a remote networked laser printer that supports PS and PCL. > "file.ps" exists and is a legitimate postscript file. The "ljet4" device > was selected during the ghostscript installation. >=20 > What am I missing? I'm not at all sure what you're trying to achieve here. If the remote printer understands PS, then you should be able to just use lpr(1) to print postscript files directly to it: no need for local invocation of Ghostscript to convert the data into PCL. (Note that lp(1) is supplied as a compatability shim for Posix 1003.2 compliance, and it's just the familiar BSD lpr(1) command in disguise.) If gs is going to be involved in printing documents, then it's more usually used as a print filter, invoked by the lpr system automatically. If you install the print/apsfilter port, it will run a setup script to configure itself, install the needed print filters and generate the necessary /etc/printcap -- works very nicely, and autodetects quite a number of different file formats which it will transparently convert to postscript for you. As for the command line you show -- I think something like the following is possibly what you intend: % gs -q -dNOPAUSE -sDEVICE=3Dljet4 -sOutputFile=3D- ./file.ps | lpr -Pp= rinter Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way PGP: http://www.infracaninophile.co.uk/pgpkey Marlow Tel: +44 1628 476614 Bucks., SL7 1TH UK --LyciRD1jyfeSSjG0 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFAxt9giD657aJF7eIRAo0OAJ9l6KD/MeI2RK30/UkahZ5kmUsOwACfVATo 4am2NbPQTLz3CpXvZTlQJ6c= =5gBV -----END PGP SIGNATURE----- --LyciRD1jyfeSSjG0--