Re: HP 932 printer and Woody
On Sat, Apr 27, 2002 at 11:00:53AM -0400, Cougar wrote:
> Has anyone managed to get the HP 900 series to work with Woody?
Well, my 932C works great with Sid... using hpijs. Since hpijs is also in
Woody, I don't see any reason why you shouldn't be able to use it.
> I've tried the search engines and the HP Linux driver page to absolutely
> no avail.
<...>
> Any feedback on this would be greatly appreciated!
My /etc/printcap looks like this:
dj2g|deskjet2g|HP Deskjet 932C (greyscale):\
:force_localhost:\
:lp=/dev/usb/lp0:\
:if=/usr/local/bin/deskjetfilter 0:\
:sd=/var/spool/lpd/dj2g:\
:mx#0:sh:
dj2n|dj|deskjet2n|HP Deskjet 932C (normal):\
:force_localhost:\
:lp=/dev/usb/lp0:\
:if=/usr/local/bin/deskjetfilter 1:\
:sd=/var/spool/lpd/dj2n:\
:mx#0:sh:
dj2p|deskjet2p|HP Deskjet 932C (photo):\
:force_localhost:\
:lp=/dev/usb/lp0:\
:if=/usr/local/bin/deskjetfilter 2:\
:sd=/var/spool/lpd/dj2p:\
:mx#0:sh:
Yes, I know, it's not pretty. I don't claim to write well, it just works.
In /usr/local/bin/deskjetfilter is the following:
#!/bin/bash
# obviously we don't want to dump PS at a non PS device,
# so let's make sure of what this job is BEFORE we
# try to print it, shall we?
# look at the first line to see...
read first_line
first_two_chars=`expr "$first_line" : '\(..\)'`
#
if [ "$first_two_chars" = "%!" ]; then
# ok, it's PS, use ghostscript to print it
/usr/bin/gs -q -dNOPAUSE -dSAFER -sBATCH -sDEVICE=DJ9xx \
-dPrintMode=$1 -sPAPERSISE=letter -sOutputFile=- -
else
# nope, not PS, so treat as ASCII text
# (a horrid kludge, but works for the moment)
echo -e -n $first_line "\r\n" && awk '{printf "%s\r\n",$0}' \
&& echo -e -n "\f" && exit 0
fi
And ghostscript is smart enough to call for hpijs if it needs it.
--
Marc Wilson
mwilson@moonkingdom.net
mwilson@cts.com
--
To UNSUBSCRIBE, email to debian-user-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Reply to: