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

hpijs



hello,

here is a preliminary port for hpijs.
> cat pkg/DESCR
                Hewlett-Packard Co. Inkjet Driver Project                    
                                                                              
The Hewlett-Packard Inkjet Driver Project is a add-on to the GNU Ghostscript  
application. This driver is open source software based on the Hewlett         
Packard Appliance Printing Development Kit APDK for deskjet printers.

WWW: ${HOMEPAGE}

------------------------------
but i have also some problems:
(a) not regarding really the port:
	i cant seem to make it work with the /usr/local/libexec/hpif
	style filter (also attached) but works ok from command line
	(from the docs), if anybody could throw me a hand...
(b) regarding the port
	what is a `regression test'?  cant seem to grasp the meaning
	of this word (i am non-native) nor its function...

-f
-- 
difference between men & boys is the price of their toys

Attachment: hpijs.tgz
Description: application/tar-gz

#!/bin/sh
#
#  ifhp - Print Ghostscript-simulated PostScript on a DeskJet 690C
#  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 is PostScript; use Ghostscript to scan-convert and print it.
    #
    #  Note that PostScript files are actually interpreted programs,
    #  and those programs are allowed to write to stdout, which will
    #  mess up the printed output.  So, we redirect stdout to stderr
    #  and then make descriptor 3 go to stdout, and have Ghostscript
    #  write its output there.  Exercise for the clever reader:
    #  capture the stderr output from Ghostscript and mail it back to
    #  the user originating the print job.
    #
    exec 3>&1 1>&2

    MODEL="DESKJET 870"

    /usr/local/bin/gs -dBATCH -dSAFER -dNOPAUSE -q -r300 -sDEVICE=ijs \
	-sIjsServer=hpijs -dIjsUseOutputFD \
	-sDeviceManufacturer="HEWLETT-PACKARD" \
	-sDeviceModel=$MODEL \
	-sIjsParams="Quality:ColorMode=0" \
	-sOutputFile=/dev/fd/3  - && exit 0

    /usr/local/bin/gs -dBATCH -dSAFER -dNOPAUSE -q -r300 -sDEVICE=ijs \
	-sIjsServer=hpijs -dIjsUseOutputFD \
	-sDeviceManufacturer="HEWLETT-PACKARD" \
	-sDeviceModel=$MODEL \
	-sIjsParams="Quality:ColorMode=0" \
	-sOutputFile=-		- && exit 0

    # some other parameters:
    # -dDuplex=false
    # -dTumble=false
    # -sIjsParams="Quality:Quality=n,Quality:ColorMode=n,Quality:MediaType=n,
    #              Quality:PenSet=n,Quality:FullBleed=n,PS:MediaPosition=n"
    #
    #  Quality equals: 0=normal (default), 1=draft, 2=best, 3=hires             
    #  ColorMode equals: 0=grey_k, 1=grey_cmy, 2=color (default)                
    #  MediaType equals: 0=plain (default), 1=premium, 2=photo                  
    #  PenSet equals: 0=black_pen, 1=color_pen, 2=both_pens, 3=mdl_pen,
    #                 4=mdl_both
    #  FullBleed equals: 0=no (default), 1=yes                                  
    #  MediaPosition equals: 1=upper_tray, 4=lower_tray, 7=autoselect (default) 
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 "\033&l0H" && exit 0
fi

exit 2
#	$OpenBSD: printcap,v 1.3 1999/09/23 01:31:20 deraadt Exp $

#lp|local line printer:\
#	:lp=/dev/lp:sd=/var/spool/lpd:lf=/var/log/lpd-errs:

#rp|remote line printer:\
#	:lp=:rm=printhost:rp=lp:sd=/var/spool/lpd:lf=/var/log/lpd-errs:

hp690|lp|HP 690C:\
	:lp=/dev/lpa2:\
	:sd=/var/spool/lpd/hp690:\
	:lf=/var/spool/lpd/hp690/logfile:\
	:af=/var/spool/lpd/hp690/acct:\
	:if=/usr/local/libexec/hpif_ijs:\
        :mx#0:sh:

Visit your host, monkey.org