From owner-freebsd-questions Thu Oct 22 13:19:24 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id NAA23530 for freebsd-questions-outgoing; Thu, 22 Oct 1998 13:19:24 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from primus.mynet.net (port13-17.lancaster.desupernet.net [208.7.250.80]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id NAA23520 for ; Thu, 22 Oct 1998 13:19:20 -0700 (PDT) (envelope-from jeffers@redrose.net) Received: (from jeffers@localhost) by primus.mynet.net (8.8.8/8.8.8) id QAA04716; Thu, 22 Oct 1998 16:15:52 -0400 (EDT) (envelope-from jeffers) Message-ID: <19981022161551.A4671@mynet.net> Date: Thu, 22 Oct 1998 16:15:51 -0400 From: David Jeffers To: Christopher Raven Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Ghostscript hell :-() SOLVED :-) Reply-To: David Jeffers Mail-Followup-To: Christopher Raven , freebsd-questions@freebsd.org References: <362F6AA1.43D6D636@ukonline.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.93.1i In-Reply-To: <362F6AA1.43D6D636@ukonline.co.uk>; from Christopher Raven on Thu, Oct 22, 1998 at 06:25:53PM +0100 X-Operating-System: FreeBSD primus.mynet.net 2.2.7-RELEASE FreeBSD 2.2.7-RELEASE Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by hub.freebsd.org id NAA23524 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG For anyone interested here's what I did to get Ghostscript printing Postscript files: 1. Compiled ghostscript-5.10 (using the port). I didn't trust the package but who knows? 2. Despite the gs.1 man pages which claim that GS_LIB_DEFAULT is properly set - I set the variables myself: GS_LIB='/usr/local/share/ghostscript/5.10:/usr/local/share/ghostscript/fonts' export GS_LIB GS_OPTIONS='-dNODISPLAY' export GS_OPTIONS The above is in my .bashrc file. The '-dNODISPLAY' is necessary if you haven't set your DISPLAY variable or at least stops errors when using gs from the command line. (See users.txt) 3. Printcap is pretty simple: lp|local Deskjet printer:\ :lp=/dev/lpt0:sd=/var/spool/output/lpd/:lf=/var/log/lpd-errs:sh:mx#0:\ :if=/usr/local/libexec/lpfilter: 4. I reworked the lpfilter since ghostscript-5.10 uses Level 3 and the first line '%!PS-Adobe-3.0' for all it's files. This simplifies the script(see below). Thanks to Doug White for his help: #!/bin/sh read first_line if [ "$first_line" = "%!PS-Adobe-3.0" ]; then /usr/local/bin/gs -q -dNOPAUSE -sDEVICE=deskjet -sOutputFile=- - else echo echo -n $first_line cat printf "\f" fi 5. For HP 660c DeskJet users the 'deskjet' DEVICE above prints in b/w and doesn't require a -dBitsPerPixel line like the 'cdj550' does. For color printing you need to adjust the pixel line -see devices.txt in the 5.10 docs for info on other printers. Hope this incantation helps all those who have been having problems! -Dave ---------------------------------------------------------------------- On Thu, Oct 22, 1998 at 06:25:53PM +0100, Christopher Raven wrote: > Patrick Gardella wrote: > > > > Here are some pages that might help you getting the Epson Stylus line to work: > > > > http://www.u.arizona.edu/~zdw/uniprint.html > > http://eunuchs.org/epson/index.html > > > > > I have seen them before, but there didn't (?) appear to be anything > for automating printing under FreeBSD. > > > > They're for Linux, but they helped get my Stylus 600 works very well with > > FreeBSD. > > > > I use the unified printer stuff for mine (which is at home, or I would send it > > to you now.) I'll try to remember tonight to get the info. > > > > As a simple test, try: > > > > gs @stc.upp -sOutputFile="|lpr" yourfile.ps -c quit > > > This one just spews out blank pages, > > > > > > or for the 800 specifically: > > > > gs @stc800pl.upp -sOutputFile="|lpr" yourfile.ps -c quit > > > > > But this one prints fine ~ I'm not sure what else got tweaked in my > fiddling, but this one didn't work either the last time I tried ! > > I just need to automate it now........ I don't suppose anyone has a > copy of their printcap and filter files lying about? There seems to be > an error in mine as they still just spew out the Ghostscript headers. > > BTW I have added the :mx#0: \ line to printcap, that was missing I > noticed. > > > TIA, > > Chris R. > > > -- David Jeffers -------------- mailto: jeffers@redrose.net ---------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message