Print issues from ghostscript
m.seaman at infracaninophile.co.uk
Wed Jun 9 10:01:49 GMT 2004
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
> 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
Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks
PGP: http://www.infracaninophile.co.uk/pgpkey Marlow
Tel: +44 1628 476614 Bucks., SL7 1TH UK
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20040609/1b9667c5/attachment.bin
More information about the freebsd-current