Bug 37085 - apsfilter/ghostscript don't work with hpijs driver any longer
Summary: apsfilter/ghostscript don't work with hpijs driver any longer
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: andreas
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-04-15 04:20 UTC by Chris Shenton
Modified: 2002-10-29 08:37 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Shenton 2002-04-15 04:20:00 UTC
	
Ports stub-files cvsupped from last night.  The apsfilter Makefile and
the installed /usr/local/apsfilter/bin/apsfilter script show verison 7.2.2.

Used to have apsfilter with ghostscript sending to my HP932c printer
just fine, with the fairly-new hpijs drivers.  Recently used
"portupgrade -R" to rebuild "apsfilter" and all its dependencies, and
now it won't print. Appears apsfilter is invoking ghostscript with
flags no longer recongized by ghostscript, possibly due to changes in
the hpijs driver.

Fix: 

Unknown.  I don't know the "hpijs" driver nor ghostscript well enough
to understand the interaction of these flags. 


I just found the searchable archives for apsfilter and found this one
hit which might be relevant:

http://www.apsfilter.org/Lists-Archives/apsfilter-help-0203/msg00044.html
How-To-Repeat: 
When I build the apsfilter port it gives the menu of drivers for
ghostscript, it shows the default selections including "ijs HP
PhotoSmart/DeskJet series [HPinkjet]"; I take the defaults. The build
continues uneventfully.

In the apsfilter SETUP routine, I select #10 (hpijs 0.97) then printer
"HP Deskjet 930C [hpijs/DJ900]" and it complains:

    Error: Your gs version doesn't have driver "hpijs" compiled in...
    Select another driver or build a new gs version with complete or customized
    driver support.

    Now you'll see a list of drivers supported by your gs version...

I ask ghostscript what it knows:

    chris@thanatos(259> gs --help
    GNU Ghostscript 6.53 (2002-02-13)
    Copyright (C) 2002 artofcode LLC, Benicia, CA. All rights reserved.
    [...]
    Available devices:
       [...] lj5gray pj pjxl pjxl300 pxlmono pxlcolor pcl3 hpdj ijs npdl rpdl gdi

Then select a different driver in apsfilter SETUP: 11 "HP DeskJet
drivers (hpijs 1.0)", again with "HP DeskJet 930C
[ijs/DESKJET_930]".  Then ask it to print a test page:

    Printing Test page using:
    gs -q -dBATCH -dNOPAUSE -dPARANOIDSAFER                 -dSAFER -r600x600 -sDEVICE=ijs -sPAPERSIZE=letter                  -sIjsParams='Quality=2,ColorMode=2,MediaType=2,PenSet=2' -sDeviceManufacturer=HEWLETT-PACKARD -sDeviceModel='DESKJET 930' -sIjsServer=hpijs             -sOutputFile='/tmp/apsfilter25867/test_page.aps' setup/test.ps

    Ok to print testpage? [y/n] y

and see the following in the logs:

    Creating test page...
    unable to set key=OutputFile, value=/tmp/apsfilter25867/test_page.aps
    unable to set key=Quality, value=2
    unable to set key=ColorMode, value=2
    unable to set key=MediaType, value=2
    unable to set key=PenSet, value=2
    unable to set key=Quality, value=2
    unable to set key=ColorMode, value=2
    unable to set key=MediaType, value=2
    unable to set key=PenSet, value=2
    unable to set key=Quality, value=2
    unable to set key=ColorMode, value=2
    unable to set key=MediaType, value=2
    unable to set key=PenSet, value=2
    unable to set key=Quality, value=2
    unable to set key=ColorMode, value=2
    unable to set key=MediaType, value=2
    unable to set key=PenSet, value=2
    unable to SetPixelsPerRow width=4800, err=26

At this point the program hangs. Trying to print with this printer
causes the output to hang when I do an "lpq".

This sounds like the flags passed to "gs" with the "-s" option are not
(or no longer) recognized by "gs".

I tried with both ghostscript-gnu (the apsfilter prerequisite) as well
as de-installing then pre-installing ghostscript-afpl, with same
results.

I also tried removing the /usr/local/share/apsfilter hierarchy in case
some config info there from the old (working) install had option
switches which confliced with the new binaries, but got the same
results, "unable sto set key=...", then hang.
Comment 1 chris 2002-04-24 17:31:25 UTC
[Following up to freebsd bug report, and apsfilter-stable where my
 apsfilter-bug submission went; also to apsfilter-help since other
 users will probably encounter this, it's not freebsd-specific.]


Spent a bunch of time trying to figure where the bogus key/values were
getting set, which generated:

  unable to set key=OutputFile, value=/tmp/apsfilter4303/test_page.aps
  unable to set key=Quality, value=0
  unable to set key=ColorMode, value=2
  unable to set key=MediaType, value=0
  unable to set key=PenSet, value=2

Checked the hpijs page on sourceforge, then the file:

  /usr/ports/print/ghostscript-gnu/work/ghostscript-6.53/hpijs-1.0.4/hpijs_readme.html.

Looks like the option syntax has changed.  For my Deskjet 930, they're
being set in

  /usr/local/share/apsfilter/driver/ijs/DESKJET_920

I've hacked it according to the following diff, but the other files
need to be fixed too in the same way.


*** DESKJET_920.ORIG_BROKEN	Sun Dec 16 12:52:29 2001
--- DESKJET_920	Wed Apr 24 12:12:12 2002
***************
*** 5,19 ****
  case "$COLOR" in
  	full)	case "$QUALITY" in
  			high|photo)	RESOLUTION=600x600
! 					params="Quality=2,ColorMode=2,MediaType=2,PenSet=2" ;;
  			*)		RESOLUTION=300x300
! 					params="Quality=0,ColorMode=2,MediaType=0,PenSet=2" ;;
  		esac ;;
  	*)	case "$QUALITY" in
  			high|photo)	RESOLUTION=600x600 ;;
  			*)		RESOLUTION=300x300 ;;
  		esac
! 		params="Quality=0,ColorMode=0,MediaType=0,PenSet=2" ;;
  esac
  
  if [ -n "$HARDWARE_DUPLEX" -a -n "$DUPLEX" ]; then
--- 5,19 ----
  case "$COLOR" in
  	full)	case "$QUALITY" in
  			high|photo)	RESOLUTION=600x600
! 					params="Quality:Quality=2,Quality:ColorMode=2,Quality:MediaType=2,Quality:PenSet=2" ;;
  			*)		RESOLUTION=300x300
! 					params="Quality:Quality=0,Quality:ColorMode=2,Quality:MediaType=0,Quality:PenSet=2" ;;
  		esac ;;
  	*)	case "$QUALITY" in
  			high|photo)	RESOLUTION=600x600 ;;
  			*)		RESOLUTION=300x300 ;;
  		esac
! 		params="Quality:Quality=0,Quality:ColorMode=0,Quality:MediaType=0,Quality:PenSet=2" ;;
  esac
  
  if [ -n "$HARDWARE_DUPLEX" -a -n "$DUPLEX" ]; then
***************
*** 24,27 ****
  	fi
  fi
  
! GS_FEATURES="$GS_FEATURES -sIjsParams='$params' -sDeviceManufacturer=HEWLETT-PACKARD"
--- 24,27 ----
  	fi
  fi
  
! GS_FEATURES="$GS_FEATURES -dIjsUseOutputFD -sIjsParams='$params' -sDeviceManufacturer=HEWLETT-PACKARD"
Comment 2 Ying-Chieh Liao freebsd_committer 2002-05-21 07:56:33 UTC
Responsible Changed
From-To: freebsd-ports->andreas

over to apsfilter maintainer
Comment 3 andreas freebsd_committer 2002-10-29 08:35:55 UTC
State Changed
From-To: open->closed

I'll update the apsfilter port in a few minutes. 
The port update include fixes that were mailed 
by Michael Lossin to the apsfilter mailinglist 
at around April this year. Sorry for the long delay. 
Please test, if still something should be missing let 
me know. For me it fixes printing with newest hpijs 
port and ghostscript-afpl so I assume everything 
should be fine now.