Re: Print issues from ghostscript

From: Matthew Seaman <m.seaman_at_infracaninophile.co.uk>
Date: Wed, 9 Jun 2004 10:58:56 +0100
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.
> 
> The system prints fine if I try something like:
> 
> # lp -dprinter /etc/printcap
> 
> But will not print if I try:
> 
> # gs -q -dNOPAUSE -sDEVICE=ljet4 -sOutputFile=\|lp -dprinter ./file.ps -c
> quit
> 
> I get the following:
> 
> lpr: lp: unknown printer
> 
> "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.
> 
> 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=ljet4 -sOutputFile=- ./file.ps | lpr -Pprinter

	Cheers,

	Matthew

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

Received on Wed Jun 09 2004 - 08:01:49 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:56 UTC