Hewlett-Packard Co. Linux Inkjet Driver Project

The Hewlett-Packard Linux Inkjet Driver Project is a add-on to the GNU Ghostscript application. This driver is based on the Hewlett Packard Appliance SDK for Deskjet printers.

Table of contents


Overview

The Hewlett-Packard Linux Inkjet Driver Project is a add-on to GNU Ghostscript. This driver is based on the Hewlett-Packard Appliance APDK for deskjet printers. There are two parts to the HP Inkjet Driver - glue code that resides in GNU Ghostscript and APDK server. The APDK runs as a server or coprocess to GNU Ghostscript. This document will refer to the APDK server as the HP Inkjet Server (HPIJS). The following figure is a high level overview of the interface between GNU Ghostscript and the HP Inkjet Server.

GNU Ghostscript is a software application that interprets PostScript and displays the results on the screen or converts the PostScript into a form you can print on a non-PostScript printer.

PostScript is a programming language optimized for printing graphics and text, it is sometimes called a page description language. Most Linux applications support PostScript. Postscript is the standard for printing in any Linux or Unix environment.

Ghostscript supports many output devices, including many different printers. This document addresses how to add the Hewlett-Packard Inkjet Driver to the current GNU Ghostscript and how to use it.

The Hewlett-Packard Inkjet Driver is just another printer driver added to GNU Ghostscript. Adding printer drivers is a well documented interface that is described in the GNU Ghostscript documentation at http://www.cs.wisc.edu/~ghost/doc/gnu/index.htm. Together with Ghostscript and the Inkjet Driver, PostScript can be converted to PCL that is compatible with many of the latest HP inkjet products. See Building on how to build Ghostscript with the Inkjet Driver.

GNU Ghostscript is not a gui application. Ghostscript is a command line application that runs from a Linux shell, similar to a Microsoft DOS command run from a DOS window.

GNU Ghostscript can be used by itself to print to a non-Postscript printer, but generally a print spooler musted be used. The print spooler must be configured to use Ghostscript when printing to a non-Postscript printer. Most Linux distributions use a gui application called PrintTool to configure a print spooler. See Installation on how to install a print spooler for Hewlett Packard supported printers.


License

GNU Ghostscript and the glue code does meet GNU General Public License (GPL) requirements. The HP Inkjet Server has a BSD license with a "HP product only" clause.

System Requirements

The Hewlett-Packard Linux Inkjet Driver requires GNU Ghostscript version 5.50 or higher. GNU Ghostscript is platform-independent and works on many different systems - Unix, Linux, Windows, OS/2 etc. The driver was developed and tested with GNU Ghostscript 5.50 running with Redhat 6.2 and 7.0.

Driver Support

There are currently 34 HP inkjet printer models supported with the GNU Ghostscript/Inkjet Server (GS/HPIJS) combination. HP printer support is defined by the current Hewlett Packard Appliance SDK. See the SDK documetation at http://hpapdk.com for more information.

GS/HPIJS supports all the current HP printer models with different command line parameters.

GS/HPIJS can be used by itself to print to a HP printer, but generally a print spooler musted be used. The print spooler must be configured to use Ghostscript when printing to a HP printer. Most Linux distributions use a gui application called PrintTool to configure a print spooler.

PrintTool allows the "root" user to create a print spool for a specifified printer. PrintTool configures the print spool with script files that pass the proper command line parameters to GS/HPIJS.

With PrintTool you can configure GS/HPIJS to use the following HP printers.


Building the source code

The following build instructions are for Redhat 7.0 using GNU Ghostscript 5.50.

  1. Download gs, jpeg, png and zlib into the following directories respectfully. See the GNU Ghostscript documentation for more information.
    ../gs/gs5.50/
    ../gs/gs5.50/jpeg/
    ../gs/gs5.50/libpng/
    ../gs/gs5.50/zlib/
    
  2. Download the source code for the HP InkJet Server files here and put them in the following directory.
    ../gs/hpijs/
    
  3. Copy the following files from ../gs/hpijs/ to the ../gs/gs5.50/ directory.
    gdevhpijs.c
    contrib.mak
    unix-gcc.mak
    
  4. Now build GS/HPIJS by running the following make commands.
    ../gs/gs5.50/make
    ../gs/hpijs/make
    
  5. With the following commands you can make GS/HPIJS the default gs command.
    # cp ../gs/gs5.50/obj/gs /usr/bin/
    # cp ../gs/hpijs/hpijs /usr/bin/
    
  6. In order to use PrintTool with GS/HPIJS you must append the printerdb_append file with /usr/lib/rhs/rhs-printfilters/printerdb. This will allow you to select the HP printers supported by GS/HPIJS. Use the following shell script.
    # sh append_db.sh
    

For different Linux distributions you will have to modify the unix-gcc.mak file. The following changes were made to unix-gcc.mak for Redhat 7.0.

from:

prefix = /usr/local
GS_LIB_DEFAULT=$(gsdatadir):$(gsdir)/fonts
XLIBDIRS=-L/usr/X11/lib

to:

prefix = /usr
GS_LIB_DEFAULT=$(gsdatadir):$(datadir)/fonts/default/ghostscript:$(datadir)/fonts/default/Type1
XLIBDIRS=-L/usr/X11R6/lib


Installation

In order to install the GS/HPIJS you must be logged in as root. Then start the printtool program.

You should see the following PrintTool window. PrintTool already has two print spools installed - lp8 and lp. These spoolers are based on reversed engineered HP printer drivers. We are going to add our own HP printer driver.


Click on the Add button.


Click OK to install a local printer.


This window shows the local device /dev/lp0 was detected - click OK.


The name of our spooler will be lp0 - click Select.


This window displays all printer devices supported by PrintTool. We will select the HP - developed DeskJet 900C series - click OK, OK.


Use the lpd menu to restart the lpd daemon so that the spool entry will be recognized. We are now done - exit PrintTool.


Usage

The user can use the new spooler created in our installation example above by specifying lp0 as the print spool. The following command will print a postscript file to the lp0 spooler.

$ lpr -Plp0 favre.ps

Most Linux applications use the lpr command to print documents. If you do not specify which spooler to print to, the lpr command will default to the first spooler entry in PrintTool. In our installation example above this would be lp8. The following command would default to lp8.

$ lpr favre.ps

Make lp0 the first entry in PrintTool if you want it to be the default spooler.

Copyright (c) 2001 Hewlett-Packard Company. All rights reserved.
Last updated Jan 23, 2001