Date: Wed, 14 Apr 1999 17:16:49 -0700 (PDT) From: Mark Bermal <mark@ieng9.ucsd.edu> To: balrog@swipnet.se Cc: freebsd-questions@freebsd.org Subject: Re: LaserJet series 2 Message-ID: <Pine.BSF.4.05.9904141708320.11002-100000@celerystick.inetworld.net>
next in thread | raw e-mail | index | archive | help
Hello! I use an HP DeskJet 693C, and I was having similar problems. The big key for me was to remember to put backlashes "\" at the end of the non terminal lines in the /etc/printcap file in your case lp|lj|local LaserJect series 2 printer:\ :sh:\ :lp=/dev/lpt0:sd=/var/spool/output/lpd:lf=/var/log/lpd-errs:\ #you were missing the \ at the end of the line above :if=/usr/local/libexec/lpfilter: I think the \ is your problem, exact same thing happened to me w/ my HP. For a little extra, here's my /etc/printcap and filter (if-hp). The filter checks if the file is a PS file, and if it is runs it thru ghostscript (alladin), and if not just sends it to print as if it were a text file. It also has the codes to get ride of the staircase effect. I got the filter from the handbook verbatim, and it works fine, even printed ps graphics. Have fun! Mark Bermal My /etc/printcap # @(#)printcap 5.3 (Berkeley) 6/30/90 # $Id: printcap,v 1.9 1998/02/04 12:09:06 ache Exp $ # # This enables a simple local "raw" printer, hooked up to the first # parallel port. No kind of filtering is done, so everything you # pass to the "lpr" command will be printed unmodified. # # Remember, for further print queues you're going to add, you have to # chose different spool directories (the "sd" capability below), # otherwise you will greatly confuse lpd. # # For some advanced printing, have a look at the "apsfilter" package. # It plugs into the lpd system, allowing you to print a variety of # different file types by converting everything to PostScript(tm) # format. If you don't have a PostScript(tm) printer, don't panic, # but do also install the "ghostscript" package. # # Do also refer to section 7 (Printing) of the handbook. A local copy # can be found under /usr/share/doc/handbook/handbook.{html,latin1}. # # Banner pages are now suppressed by default. Remove the :sh: # capability to turn them back on. # scribe|lp|ps|gs|the only printer|HP Deskjet 693C:\ :sh:\ :lp=/dev/lpt0:sd=/var/spool/lpd/scribe:lf=/var/log/lpd-errs:\ :if=/usr/local/libexec/if-hp:df=/usr/local/libexec/dvi2psf: # # Sample remote printer. The physical printer is on machine "lphost". # NB: you cannot perform any kind of local filtering directly. If # you need local filters (e.g. LF -> CR-LF conversion for HP printers), # create a filter script that recursively calls lpd with another -P # argument after filtering. # #remote|sample remote printer:\ # :sh:\ # :rm=lphost:sd=/var/spool/output/lphost:lf=/var/log/lpd-errs: # # Simple Russian printer with hardware CP866 character set, output filter # used for KOI8-R -> CP866 conversion # #lp|Russian local line printer:\ # :sh:of=/usr/libexec/lpr/ru/koi2alt:\ # :lp=/dev/lpt0:sd=/var/spool/output/lpd:lf=/var/log/lpd-errs: my filter (/usr/local/libexec/if-hp) #!/bin/sh printf "\033&k2G" || exit 2 read first_line first_two_chars=`expr "$first_line" : '\(..\)'` if [ "$first_two_chars" = "%!" ]; then /usr/local/bin/gs -dSAFER -dNOPAUSE -q -sDEVICE=cdj670 -sOutputFile=- - \ && exit 0 else echo $first_line && cat && printf "\f" && exit 0 fi exit 2 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.05.9904141708320.11002-100000>