[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: PCL only printer



You rock the linux/DeskJet 932C world!  I don't care what you say
about your scripting skills!  :)

That's mostly initial excitement over the fact that this is the first
time I sent a print job to my 932C and got what I hoped instead of
"%!PS-Adobe-1.0 . . . ".

This doesn't mean I'm completely in the clear, however, but oh so much
closer than 30 minutes ago when I was downloading foomatic-bin and
libwww- perl and etc. and then running 'foomatic-configure' only to
find out it doesn't support 932C's (at least not with the stable
version).

The main problem now is that almost everything prints in red or shades
of red.  When postscripts were not printing correctly before, what was
being printed was in black.  Now what should be black prints as red.
Not sure if this is due to earlier versions of software than
you are using.  I am using the (stable) versions of the following

	hpijs          1.0.4-1
	gs             6.53-3

Along that line, I haven't been able to figure out from the HP page yet
how to print a test page from the printer itself so that I can see what
colors are correctly printing.  One doc I read said to hold the power
button while hitting cancel twice to clean the heads.  It said after
the cleaning it would print one page to give the results.  The cleaning
appears to happen but no page is ever printed.

Paul


->>In response to your message<<-
  --received from Marc Wilson--
>
> On Thu, Feb 19, 2004 at 02:20:28PM -0800, Paul Yeatman wrote:
> > Hi, I recently inherited an HP Deskjet 932C printer.  Apparently this
> > only uses the PCL printer language.  As I need to be able to print
> > postscript for this to be of much use to me, I've been struggling to
> > make this happen.
> 
> I love my 932C.  Works great.  Cartridges are a little expensive, like all
> HP inkjets, but it prints well.
> 
> <much ado about ifhp deleted>
> 
> Well, ifhp is smart enough to use ghostscript in order to get from
> PostScript to PCL when it has to, but I don't think it can do what you want
> directly.  It has to be aware that it should be producing the color
> superset of PCL 3 that the 932C speaks, and I'm not sure it can.  I beat on
> it for a while, then gave up and wrote a shell script to support the 932C.
> I reproduce it below.
> 
> *****
> /etc/printcap:
> *****
> 
> # /etc/printcap
> #   for rei
> 
> # the simplest solutions are the best... no apsfilter, no magicfilter,
> # just ifhp and one, count 'em, ONE shell script for talking to the
> # deskjets.
> 
> # whyinhell do people mess with all the other crap?
> 
> lp|laser|pro630|LaserWriter:
>     :ifhp=model=apple,letter,status@
>     :filter=/usr/lib/ifhp/ifhp
>     :lp=jetdirect2%9100
>     :mx#0
>     :sh
>     :rg=printers
> 
> dj932c|DeskJet_932C_Color:
>     :lp=/dev/usb/lp0
>     :if=/usr/local/bin/deskjetfilter 932
>     :mx#0
>     :sh
>     :rg=printers
> 
> dj1120c|DeskJet_1120C_Color:
>     :lp=jetdirect1%9100
>     :if=/usr/local/bin/deskjetfilter 1120
>     :mx#0
>     :sh
>     :rg=printers
> 
> # below here are special-purpose printers
> 
> pdf|pdfwriter|PDF_Writer
>     :lp=/dev/null
>     :if=/usr/local/bin/pdffilter
>     :mx#0
>     :sh
>     :rg=printers
> 
> # end of /etc/printcap
> 
> # $Id: printcap,v 1.8 2004/02/24 06:34:18 root Exp root $
> 
> *****
> /usr/local/bin/deskjetfilter
> *****
> 
> #!/bin/bash
> # deskjetfilter - take in postscript, output PCL via GhostScript/HPIJS
> 
> # Marc Wilson (msw@cox.net)
> 
> # uncomment the following line to enable entirely too much output...
> #DEBUG=yes
> 
> GS='/usr/bin/gs'
> HPIJS='/usr/bin/hpijs'
> # I'd like to run them both at 600 dpi, but the 1120C weirds out
> # so set it for the 932C specifically down below...
> # GSOPTS='-q -dNOPAUSE -dSAFER -sBATCH -r600x600'
> GSOPTS='-q -dNOPAUSE -dSAFER -sBATCH'
> IJSOPTS1='-sDEVICE=ijs -sIjsServer=hpijs -dIjsUseOutputFD -sDeviceManufacturer="HEWLETT-PACKARD"'
> IJSOPTS2='-sDeviceModel="DESKJET 1120"'
> LOGGER='/usr/bin/logger'
> ENSCRIPT='/usr/bin/enscript'
> ENSCRIPTOPTS='-Bh -M letter -p -'
> FACILITY="lpr.debug"
> 
> TEMPORARY=`mktemp /tmp/deskjet_XXXXXXXX`
> 
> if [ ! -x "$GS" ] || [ ! -x "$HPIJS" ]; then exit 1 ; fi
> 
> case "$1" in
>     932)
>         if [ "$DEBUG" ]; then $LOGGER -p $FACILITY "deskjetfilter: Specified printer is 932C" ; fi
>         # 932C is a PITA, you get crap unless you push it into Photo mode
>         IJSOPTS2='-sDeviceModel="DESKJET 932" -sIjsParams="Quality:Quality=2,Quality:ColorMode=2,Quality:MediaType=2"'
>         PAPER="-sPAPERSIZE=letter"
>         GSOPTS="$GSOPTS -r600x600"
>         ;;
>     1120)
> 	    if [ "$DEBUG" ]; then $LOGGER -p $FACILITY "deskjetfilter: Specified printer is 1120C" ; fi
>         # 1120C seems to do quite well  at a lower quality setting
>         IJSOPTS2='-sDeviceModel="DESKJET 1120"'
>         # 1120C can do letter, but that's what the 932C is here for, after all
>         PAPER="-sPAPERSIZE=11x17"
>         ;;
>     *)
> 	    if [ "$DEBUG" ]; then $LOGGER -p $FACILITY "deskjetfilter: Printer type was not specified" ; fi
>         exit 1
>         ;;
> esac
> 
> # save the input stream
> 
> cat > $TEMPORARY
> 
> # let's make sure of what this job is BEFORE we try to print it, shall we?
> 
> if (file $TEMPORARY | grep PostScript >/dev/null 2>&1); then
> 
> 	# ok, it's PS, use ghostscript to print it
> 
>     if [ "$DEBUG" ]; then 
>     	$LOGGER -p $FACILITY "deskjetfilter: Input stream is PostScript"
> 	    $LOGGER -p $FACILITY "deskjetfilter: $GS $IJSOPTS1 $IJSOPTS2 $GSOPTS $PAPER -sOutputFile=- $TEMPORARY"
>     fi
> 
>     # stupid quoting behavior of bash seems to require using eval...
> 
> 	eval "$GS $IJSOPTS1 $IJSOPTS2 $GSOPTS $PAPER -sOutputFile=- $TEMPORARY"
>     rm $TEMPORARY
> 
> elif (file $TEMPORARY | grep text >/dev/null 2>&1); then
> 
>     # not PS, file(1) thinks it's text so go with that
> 	# this should probably go through GS/HPIJS as well...
> 
>     if [ "$DEBUG" ]; then 
> 	    $LOGGER -p $FACILITY "deskjetfilter: Input stream is ASCII text"
>     fi
> 
>     $ENSCRIPT $ENSCRIPTOPTS $TEMPORARY
>     rm $TEMPORARY
> 
> else
> 
> 	# it's not PostScript, and it's not text, so fail out
> 
>     if [ "$DEBUG" ]; then $LOGGER -p $FACILITY deskjetfilter: ERROR: Unrecognizable input to filter ; fi
>     rm $TEMPORARY
> 	exit 1
> 
> fi
> 
> Yes, it's a hack.  I'm certainly no great shakes at shell scripting... in
> my defense, all I can say is that it works.  This is more or less set up to
> print pictures... letter size for my 932C and tabloid size for my 1120C.  I
> don't print text with them... that's what real PostScript laser printers
> are for.
> 
> > According to 'man gs', I should be able to run something like 'gs
> > -sDEVICE=hpijs file.ps' to have file.ps print directly to the printer for
> > which "hpijs" is a driver.
> 
> Forget it.  The ghostscript documentation doesn't match the way hpijs works
> now.  Let me qualify that by saying that I'm specifically talking about gs
> 7.07 and hpijs 1.5 from unstable.  The hpijs web site is your friend.
> 
> -- 
>  Marc Wilson |     Pascal: A programming language named after a man who
>  msw@cox.net |     would turn over in his grave if he knew about it.
>              |     -- Datamation, January 15, 1984
> 
> 
> -- 
> To UNSUBSCRIBE, email to debian-user-request@lists.debian.org 
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
> 

-- 
Paul Yeatman       (858) 534-9896        pyeatman@ucsd.edu
	     ==================================
	     ==Proudly brought to you by Mutt==
	     ==================================



Reply to: