/ Markus Amersdorfer:home / university / about:me /
\ capsaicin - my blog on growing chilis \


HP Deskjet 5550 with CUPS

Here's what I did to get the HP DeskJet 5550 working with Debian's CUPS locally, as well as this solution's current drawback.
If you're interested, here's how to get CUPS providing print services to Linux clients, how to get CUPS providing print services to Windows clients and (externally) another detailed CUPS mini-mini-HOWTO.

Basic Installation with CUPS

First (manual) installation: HPIJS version 1.2.2

First (manual) upgrade: HPIJS version 1.3.1

Today is 03-03-19: I just updated to HPIJS version 1.3.1. In order to get the possibility of a "Custom Paper Size" (which is one of the new featues of version 1.3.1), all I did was:

  1. /etc/init.d/cupsys stop
  2. Download the latest driver from http://hpinkjet.sourceforge.net/
  3. mv /opt/hpijs /opt/hpijs_OLD
  4. ./configure --prefix=/opt/hpijs && make && make install
  5. Create a current PPD-O-Matic based PPD-file at http://www.linuxprinting.org/show_driver.cgi?driver=hpijs and save it to /usr/share/cups/model/HP-DeskJet_5550-hpijs-ppd.ppd (with previously making a backup of the old one)
  6. /etc/init.d/cups start
  7. Use CUPS' webinterface to "Modify Printer" and thus kind of re-load the PPD-file (I suppose).

"Upgrade" to Debian Sarge packages (HPIJS 1.3.1, Foomatic 3.0.0)

Today is 03-06-13: As Debian Sarge now offers new foomatic-packages (version 3.0.0) and the HPIJS 1.3.1 as Debian package too, I just had to install all those. (Well, besides wanting to use them, I also wanted to fight the upgrade ... and won, finally :) ...).

Stop CUPS:
  /etc/init.d/cupsys stop

Restore Debian defaults:
  rm /usr/local/bin/hpijs (link to /opt/hpijs/bin/hpijs)
  mv /usr/share/cups/model/HP-DeskJet_5550-hpijs-ppd.ppd /tmp/HP-DeskJet_5550-hpijs-ppd_03-06-13_old.ppd
  mv /usr/lib/cups/filter/cupsomatic /usr/lib/cups/filter/cupsomatic_linuxprinting.org
  mv /usr/lib/cups/filter/cupsomatic_DEB_foomatic-bin_2.0-20020911-0.4 /usr/lib/cups/filter/cupsomatic

Use dselect to upgrade, this includes the NEWly installed packages foomatic-db-engine foomatic-db-hpijs foomatic-filters hpijs.
Now, download a new PPD-file from linuxprinting.org for the HP DeskJet 5550. This can be done here. Just click on "Download PPD" next to "Recommended driver: hpijs". Save this file as /usr/share/cups/model/HP-Deskjet-5550_ppd-o-matic_03-06-13.ppd or similar (the suffix ".ppd" is important, AFAIK).

Start CUPS:
  /etc/init.d/cupsys start

With CUPS' webinterface (http://localhost:631/printers/), I used "Modify Printers" on the only printer currently installed: hp.
(Device: Parallel Port #1; Make: hp; Model: HP DeskJet 5550, Foomatic + hpijs (recommended) (en).)
Using "Configure Printer", set the default paper size to A4 (or whatever you need). Also mind the new option "Printout Mode": Draft, Normal, High, Photo, ... :)

Add-On:
I tried it without a manually downloaded PPD-file in /usr/share/cups/model/ first, but I just could select a generic DeskJet-driver when "modifying printers". This also worked basically, but is not "acceptable". Furthermore, the printout was shifted to the right by about 5 mm.
Next, I tried it with the previously already working one by moving it back to this directory. I got all the options back again after re-modifying the printer, but the printout was still shifted to the right by about 5 mm.
Dowloading the new PPD-file solved the problem. I suppose this is because only the new PPD-file works perfectly with the new Foomatic-stuff.
Apropos foomatic: this seems to be able to create PPD-files too, but I just don't understand these packages currently. (If anyone could explain this to me in short, I'd be glad :) .) Anyway, reading the READMEs in /usr/share/doc/foomatic*/ might be a good place to start. In at least one of them it can be found that one can safely purge the package foomatic-bin after having upgraded as it only serves to install the other ones which are marked as dependencies. So say apt-get remove --purge foomatic-bin.

Complete re-install with Debian Sarge (04-05-19) (short version) (HPIJS 1.5-1, Foomatic 3.0.1)

After installing cupsys and corresponding packages, I could already use the HP DJ 5550 with a basic CUPS-"driver" for HP's DeskJet series. Nevertheless, as we know that there is "perfect" support for this printer too, we do want it, don't we?
I installed the packages foomatic-db foomatic-db-engine foomatic-db-hpijs foomatic-filters hpijs in order for foomatic and hpijs to be present. A re-start of CUPS did not change anything concerning the printers-list when adding a new printer. Thus, we do need a PPD-file for the printer.
Debian Sarge has the package foomatic-filters-ppds, which holds PPD-files for all by Foomatic supported printers and needs some resources on your HDD. The package description reccomends to use the "foomatic-configure" script in foomatic-db-engine, the "foomatic-gui" package, or the web interface for getting a particular PPD file at http://www.linuxprinting.org/printer_list.cgi.
(I've just tried apt-get-installing foomatic-gui, ran the program and installed the printer ... worked perfectly fine ... CUPS immediately knew the printer, output is "perfect quality", etc. :) ...!)

Further useful packages include cupsys-pt with the "pt" program, gtklp and xpp.

a2ps

In order to get a2ps working correctly, you'll need to edit one of its config-files:

/etc/a2ps-site.cfg:
  [...]
  # Default medium
  #Options: --medium=libpaper
  Options: --medium=A4dj
  [...]

This way, you tell a2ps you have a DeskJet printer with special margins (check out /etc/a2ps.cfg too). Otherwise a2ps will print too far to the bottom of the page...

ghostscript

update -- 02-12-09:
Debian Sarge (the current "testing") holds an updated ghostscript package "gs 7.05-1". The new version does not need the patch as described below but works properly out of the box. :)
Another thanks to the Debian community!

The current drawback is the ghostscript-version used in Debian 3.0 (Stable/Woody): 6.53.
http://hpinkjet.sourceforge.net/patchfix.php#gs653: "In Ghostscript 6.53 there is a bug in gdevijs.c which swapped the top margin with the bottom margin, the following patch file will fix 6.53. This bug caused the top margin to be cut short by ~9mm. Newer releases of Ghostscript will not need this patch.
I did the following to get a patched gs-version: (Please don't complain about something I missed. It's my first DEB-package and I did not do any thorough research on the topic. It works, that's important to me at the moment. :)

  mkdir gs
  cd gs

  apt-get source gs

  cd gs-6.53/src/
  patch -p0 < ~/gdevijs2.patch
  cd ../../

  tar xzf gs_6.53.orig.tar.gz
  cd ghostscript-6.53/src/
  patch -p0 < ~/gdevijs2.patch
  cd ../../

  rm gs_6.53.orig.tar.gz
  tar cvzf gs_6.53.orig.tar.gz ghostscript-6.53

  dpkg-buildpackage -rfakeroot
  apt-get install libpaperg-dev libgimpprint-dev
  dpkg-buildpackage -rfakeroot

  dpkg -i gs_6.53-3_i386.deb

  [ set "gs" to hold in dselect as it would be replaced by the dist's standard version ]

Result: Using the recompiled gs it's much better now.

Drawback: Plain text files

Everything would work fine now - but still it doesn't:
When printing out plain-text files using lp or lpr, the position on the paper is somewhat "correct", nevertheless, the driver does not create any margins or borders (neither on top nor at the sides). Of course the printer can't print to the edges of the paper (and it wouldn't look good even if it could) so it misses the first line as well as the first and last letter of each line.
(Using the option "full bleed" it's different: The data to print out is positioned a bit more to the bottom and to the right. But perhaps that's what it shall do when printing "borderless" pictures?)
Solution: a simple lp doesn't seem to use tools such as a2ps but rather sends the text file as it is to the printer. The solution is to print using "a2ps plain.txt" instead of "lp plain.txt". And remember to edit /etc/a2ps/a2ps-site.cfg before in order to get the correct margins there.

IMHO the printer is worth every cent I paid for it: It's fast, not really loud and makes excellent print outs. :-)

Ubuntu Linux

Ubuntu Linux is a great Debian based distribution. (Read about my experiences with Ubuntu here.)
Ubuntu offers proper support for the DeskJet 5550 out of the box! (AFAICT, the solution is based on the HPIJS project. You might give HP's HPLIP a try!)

Resources


Valid XHTML 1.0 Strict Valid CSS! Created with Vim [Blue Ribbon Campaign icon]
© Markus Amersdorfer
last modified: 2010-02-23 15:42:18
15348 hits