# CUPS: Printing problem in new Gentoo install.

## wbsoft

Hi, all I sincerely hope someone can help me with this.

I:

- did: echo "some text" > /dev/lp0, that worked. OK.

- emerged cups, hpijs and kde

- started cupsd and added it to the default runlevel

- got the HP Deskjet 400 hpijs ppd from linuxprinting.org (as the info said)

- put that in /usr/share/cups/model/

- Selected 'add printer' in KDE's printmanager.

- Selected the correct port and the Deskjet 400 name from the printerlist

All looks ok. BUT: when I print a test page it prints instead: Unable to open initial device, quitting. The /var/log/cups/error_log shows that the cupsomatic filter crashes (exits with status 32)

- So I opened the ppd to see where the commands to call /usr/bin/hpijs were entered and saw some strange things like:

```
gs -q -dBATCH -dSAFER -dQUIET -dNOPAUSE -sDEVICE=ijs -sIjsServer=hpijs%A%B%C -dIjsUseOutputFD%Z -sOutputFile=- -
```

- So I removed the %A%B%C and the %Z.

But now it prints 

```
Unrecoverable error: rangecheck in setscreen

Operand stack:

    -0.0  0  --nostringval--
```

I am really stuck. hpijs appears to be called now, but why does the ppd have that strage %A%B etc in it, and why doesn't the printing work ?? (should be more easy than ever  :Mad:   :Smile:   )

----------

## wbsoft

Well, i found that the HP Deskjet 400 ppd from linuxprinting.org uses DeviceModel="HP DeskJet 4", a model hpijs does not know about.

The hpijs site (hpinkjet.sf.net) states that for Deskjet 400 support one must use the deskjet 540 driver.

That one works, but forces me to use the color cartridge (the DJ400 has interchangeable black/color cartrigdes).

I have yet to try the DJ350 driver (hoping for a native hpijs DJ400)

----------

## BackSeat

Two things to try:

1. Make sure you have cups in your USE statement

2. Re-emerge ghostscript

BS

----------

## wbsoft

It works!!

Re-emerging ghostscript did the job. (Shouldn't ghostscript depend on cups when using cups?)

Thznka!

----------

