From owner-freebsd-questions Thu Oct 26 17:49:38 1995 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id RAA09463 for questions-outgoing; Thu, 26 Oct 1995 17:49:38 -0700 Received: from uuneo.neosoft.com (mailbot@uuneo.neosoft.com [206.109.1.3]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id RAA09457 for ; Thu, 26 Oct 1995 17:49:34 -0700 Received: (from mailbot@localhost) by uuneo.neosoft.com (8.7.1/8.7.1) id TAA06495; Thu, 26 Oct 1995 19:49:31 -0500 (CDT) Received: from concorde.neosoft.com(198.65.161.214) by uuneo.neosoft.com via smap (V1.3) id sma006478; Thu Oct 26 19:49:03 1995 Date: Thu, 26 Oct 1995 19:49:01 -0500 (CDT) From: Daniel Baker X-Sender: dbaker@concorde-sam To: Sean Kelly cc: questions@freebsd.org Subject: Re: Printing with HP Deskjet In-Reply-To: <9510262011.AA26091@emu.fsl.noaa.gov> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-questions@freebsd.org Precedence: bulk On Thu, 26 Oct 1995, Sean Kelly wrote: > >>>>> "Daniel" == Daniel Baker writes: > > Daniel> I have a HP Deskjet 560c, and even after reading the > Daniel> handbooks, FAQs, and getting ghostscript running, I still > Daniel> cna't print correctly. > > Send me your /etc/printcap and copies of any scripts to which it > refers, and I'll help. # @(#)printcap 5.3 (Berkeley) 6/30/90 #lp|local line printer:\ # :lp=/dev/lp:sd=/var/spool/output/lpd:lf=/var/log/lpd-errs: deskjet:ps:PS:S:lp:HP DeskJet Printer :sh:sd=/var/spool/lpd/deskjet: :lp=/dev/lpt0: :if=/usr/local/libexec/hpif: --EOF-- #!/bin/sh # # ifhp - Print Ghostscript-simulated PostScript on a DesJet 500 # Installed in /usr/local/libexec/hpif # # Treat LF as CR+LF: # printf "\033&k2G" || exit 2 # # Read first two characters of the file # read first_line first_two_chars=`expr "$first_line" : '\(..\)'` if [ "$first_two_chars" = "%!" ]; then # # It's PostScript; use Ghostscript to scan-convert and print it # /usr/local/bin/gs -dSAFER -dNOPAUSE -q -sDEVICE=djet500 -sOutputFile=- - \ && exit 0 else # # Plain text or HP/PCL, so just print it directly; print a form # at the end to eject the last page. # echo $first_line && cat && printf "\f" && exit 2 fi exit 2 > > Daniel> Whenever I print by typing lpr filename, or doing a cat > Daniel> foobar.ps > /dev/lpt0, I just get three lines like this: > > Daniel> %!PS-Adobe-3.0 > Daniel> %%Creator: groff version 1.09 > Daniel> %%CreationDate: Thu Sep > > Well, cat'ing a PostScript file to a non-PostScript printer definitely > won't work. Let's just work on getting Ghostscript working with LPD > instead. okay..... > > -- > Sean Kelly > NOAA Forecast Systems Laboratory, Boulder Colorado USA > > I wrote a song, but I can't read music so I don't know what it is. > Every once in a while I'll be listening to the radio and I say, "I > think I might have written that." -- Steven Wright > Daniel Baker -- NeoSoft Student Asst. (UseNet, FTP & CivNet Admin.) DBaker@NeoSoft.COM DBaker@Baker.err.COM ** http://www.neosoft.com/neosoft/staff/dbaker/ ** ** http://www.baker.err.com/ **