Subject: Re: Printing via ghostscript and hpijs
To: Andy Ball <>
From: Ben Collver <>
List: netbsd-users
Date: 05/19/2006 06:05:31
On Fri, May 19, 2006 at 08:41:41AM +0000, Andy Ball wrote:
> a PostScript document I receive a single blank sheet with
> "**** Unable to open the initial device, quitting." printed
> at the top.

I have seen this error, but I forget what the cause was.

> The ghostscript people that I have asked about this don't
> recognise the error.  I would welcome advice, observations
> or perhaps example filter scripts.  Does anyone here use
> hpijs or a similar DeskJet printer?

I use hpijs on a HP DeskJet 832c.  Since there is a network print server
on it, I need a second queue for the filter.  Here is my filter script.



export PATH
/usr/pkg/bin/enscript --lineprinter --pass-through --output=- 2>/dev/null |\
  /usr/pkg/bin/gs -q -dSAFER -dBATCH -dQUIET -dNOPAUSE \
    -sDEVICE=ijs -sIjsServer=hpijs \
    -sDeviceManufacturer="HEWLETT-PACKARD" \
    -sDeviceModel="DESKJET 832" \
    -sIjsParams=Quality:Quality=0,Quality:ColorMode=2,Quality:MediaType=0,Quality:PenSet=2 \
    -dIjsUseOutputFD \
    -sOutputFile=- - |\
  /usr/bin/lpr -P dj832c-raw && \
  exit 0
exit 2
# Quality:Quality 0=normal, 1=draft, 2=best
# Quality:ColorMode 0=grey_k, 1=grey_cmy, 2=color
# Quality:MediaType 0=plain, 1=premium, 2=photo
# Quality:Penset 0=black_pen, 1=color_pen, 2=both_pens, 3=mdl_pen, 4=mdl_both
# Quality:FullBleed 0=no, 1=yes
# Quality:MediaPosition 1=upper_tray, 4=lower_tray, 7=autoselect