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.
-
HP - developed DeskJet 630C series - This driver was developed by Hewlett-Packard Co. for
630/632C deskjet printers.
Different print modes can be specified with the Extra GS option "-dPrintMode=n".
Where n equals one of the following values: 0=grayscale, 1=color, 2=normal (default) or 3=photo.
-
HP - developed DeskJet 600C series - This driver was developed by Hewlett-Packard Co. for
600, 660C, 670/672C, 670TV, 680/682C deskjet printers.
Different print modes can be specified with the Extra GS option "-dPrintMode=n".
Where n equals one of the following values: 0=grayscale, or 1=normal (default).
-
HP - developed DeskJet 600C series photo - This driver was developed by Hewlett-Packard Co. for
610/612C, 640/648C, 690/692/693/694/695/697C deskjet printers.
Different print modes can be specified with the Extra GS option "-dPrintMode=n".
Where n equals one of the following values: 0=grayscale, 1=normal (default), or 2=photo.
-
HP - developed DeskJet 800C series - This driver was developed by Hewlett-Packard Co. for
810/812C, 830/832C, 840/842C, 880/882C, 895C deskjet printers.
Different print modes can be specified with the Extra GS option "-dPrintMode=n".
Where n equals one of the following values: 0=grayscale, 1=normal (default), 2=photo, or 3=draft.
Resolution setting 600x600 is available for photo mode only.
-
HP - developed DeskJet 900C series - This driver was developed by Hewlett-Packard Co. for
930/932C, 950/952C, 970C deskjet printers.
Duplex printing is not supported.
Different print modes can be specified with the Extra GS option "-dPrintMode=n".
Where n equals one of the following values: 0=grayscale, 1=normal (default), or 2=photo.
Resolution setting 600x600 is available for photo mode only.
-
HP - developed DeskJet 990C - This driver was developed by Hewlett-Packard Co. for
990C deskjet printer.
Duplex printing is not supported.
Different print modes can be specified with the Extra GS option "-dPrintMode=n".
Where n equals one of the following values: 0=grayscale, or 1=normal (default).
Resolution setting 600x600 is available for normal mode only.
Building the source code
The following build instructions are for Redhat 7.0 using GNU Ghostscript 5.50.
- 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/
- Download the source code for the HP InkJet Server files here and put them in the
following directory.
../gs/hpijs/
- Copy the following files from ../gs/hpijs/ to the ../gs/gs5.50/ directory.
gdevhpijs.c
contrib.mak
unix-gcc.mak
- Now build GS/HPIJS by running the following make commands.
../gs/gs5.50/make
../gs/hpijs/make
- 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/
- 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