Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 9 Jun 2004 10:58:56 +0100
From:      Matthew Seaman <m.seaman@infracaninophile.co.uk>
To:        James Horvath <jhorvath@frabill.com>
Cc:        'James Horvath' <jhorvath@frabill.net>
Subject:   Re: Print issues from ghostscript
Message-ID:  <20040609095856.GB12520@happy-idiot-talk.infracaninophile.co.uk>
In-Reply-To: <20040608230421.5A97B43D49@mx1.FreeBSD.org>
References:  <20040608230421.5A97B43D49@mx1.FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040609095856.GB12520>