Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 9 Dec 1998 00:59:48 -0600
From:      Michael Maxwell <drwho@xnet.com>
To:        freebsd-questions@FreeBSD.ORG
Subject:   Re: Printer Support???
Message-ID:  <19981209005948.A547@drwho.xnet.com>
In-Reply-To: <199812080709.CAA00643@pinky.us.net>; from Brian G. Skrab on Tue, Dec 08, 1998 at 02:06:23AM -0500
References:  <199812080709.CAA00643@pinky.us.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Dec 08, 1998 at 02:06:23AM -0500, Brian G. Skrab wrote:
> Hello.
> 
> 	I have a Hewlett Packard Deskjet printer, and I can't seem to get it
> 	to print more than the first line of any file whenever I dump that
> 	file to the parallel port where the printer resides.  Does FreeBSD
> 	support DeskJet printers?  If so, which capabilities (plain text,
> 	graphics, etc.)?
---end quoted text---

I use a DeskJet 672C.  Make sure you have Ghostscript installed on your
system.  Then, there's docs in the handbook that describe in some detail
how to get this particular type of printer setup.  But here's what I have:

/etc/printcap:
lp|local line printer:\
        :sh:\
        :lp=/dev/lpt0:sd=/var/spool/lpd/lp:mx#0: \
        :if=/usr/local/libexec/hp672c-lp:lf=/var/log/lpd-errs:
psjet|postscript_inkjet: \
        :lp=/dev/lpt0: \
        :sd=/var/spool/lpd/psjet: \
        :if=/usr/local/libexec/hp672c-ps: \
        :lf=/var/log/lpd-errs: \
        :mx#0: \
        :sh

(NOTE: I might be mistaken, but I don't think you can have any blank
lines in the /etc/printcap file.. I remember having problems with that
once...)

Note particularly the "if" lines in the above printcaps... these specify
the actual print filters, which are given below:

/usr/local/libexec/hp672c-lp:
#!/bin/sh
#
# hpif - Simple text input filter for lpd for HP-PCL based printers
# Installed in /usr/local/libexec/hpif
#
# Simply copies stdin to stdout.  Ignores all filter arguments.
# Tells printer to treat LF as CR+LF. Writes a form feed character
# after printing job.

printf "\033&k2G" && cat && printf "\f" && exit 0
exit 2

#####################################################################

/usr/local/libexec/hp672c-ps:
#!/bin/sh
#This File by Todd Burgess (tburgess@uoguelph.ca)
/usr/local/bin/gs -q -dSAFER -dNOPAUSE -sDEVICE=deskjet -sOutputFile=- - 


In the last file, if I recall, you can use DEVICE=cdjcolor or something
like that to get color printouts.. just make another filter like the
one above, substitute the name, and a new printcap entry, etc....

For more info, see the handbook


-- 
drwho @ xnet.com, BOFH  --   http://www.xnet.com/~drwho/
America: where you're free to do as you're told.

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?19981209005948.A547>