DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
SourceForge Logo hpinkjet.sourceforge.net

Hewlett-Packard Co. Inkjet Driver Project

The Hewlett-Packard Inkjet Driver Project is a add-on to the GNU Ghostscript application. This driver is open source software based on the Hewlett Packard Appliance Printing Development Kit APDK for deskjet printers.

Table of contents


1 Overview

The Hewlett-Packard Inkjet Driver Project (HPIJS) is a add-on printer driver for GNU Ghostscript. This driver is open source software based on the Hewlett-Packard Appliance Printing Development Kit APDK for deskjet printers. The driver uses the IJS interface which is a generalized IPC interface for client/server communications. The IJS interface, which was written by Raph Levien of Ghostscript, was inspired by the first HPIJS interface. The IJS interface can be used by any printer manufacturer.

There are two parts to the IJS interface - IJS client that resides in GNU Ghostscript and the IJS server. The IJS server is built into the printer driver, in our case the HP Inkjet driver. In this document the term IJS server, HPIJS server, HPIJS, or HP Inkjet Driver are all synonymous. They all refer to the same software component. HPIJS runs as a server or co-process to GNU Ghostscript. The server is spawned automatically by GNU Ghostscript. The following figure is a high level overview of the IJS interface between GNU Ghostscript and HPIJS.

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 build, install and use HPIJS with Ghostscript. This document is intended for distributions and experienced users. Other users should refer to their appropriate Linux distribution for HPIJS support.

Although HPIJS runs as a separate process from Ghostscript, HPIJS still looks like just another Ghostscript printer driver. 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 HPIJS, PostScript can be converted to a printer language that is compatible with many of the latest HP printer products. See Installation on how to download and install HPIJS.

HPIJS supports both the new IJS interface and the old HPIJS interface. Support for the HPIJS interface is provided for backward compatibility only. All new features will be supported on the IJS interface only. This document only addresses how to use HPIJS using the IJS interface. The old HPIJS interface is defined in the HPIJS 0.97 release. More information on the IJS interface can be found at inkjet-list.

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.

Ghostscript can be used by itself to print to a non-Postscript printer, but generally a print spooler must be used. The print spooler must be configured to use Ghostscript when printing to a non-Postscript printer. Many Linux distributions all ready support HPIJS in their spooler system, see their web site for spooler support questions. Additional information is available at www.linuxprinting.org.


2 License

GNU Ghostscript uses the GNU General Public License (GPL) and the IJS interface uses the MIT License. After HPIJS 1.0.1 the driver uses a BSD license. HPIJS 1.0 and below uses a BSD type license with a "HP product only" clause.

3 System Requirements

HPIJS works with GNU Ghostscript 6.53 or higher. The HPIJS download includes all the necessary files to build the HP Inkjet Driver from source code. Since the current Ghostscript release now has built-in support for the IJS interface, no other Ghostscript files are necessary to run HPIJS.

HPIJS is platform-independent and works on many different Unix and Linux systems. In order to install HPIJS the download includes an automake/autoconf makefile. This portable build procedure requires an ANSI C compiler, ANSI C++ compiler and a POSIX compliant environment.

This version of HPIJS supports both the new IJS interface and the old HPIJS interface. HPIJS requires Ghostscript to support one of these two interfaces.

HPIJS emits standard file output. The output can be directed to a file or to the actual device via the parallel or USB port. Some all-in-one devices, such as OfficeJets require the HP Linux OfficeJet Driver (HPOJ). In this case HPIJS output is sent to HPOJ and then the data is passed to the actual device.

Many platforms (Red Hat, Mandrake, SuSE, Yellow Dog, FreeBSD, Debian, HPUX, AIX, etc) have been confirmed to work, please see those sites for more information.


4 Driver Support

There are currently more than 230 HP printer models supported with HPIJS. HP printer support is defined by the current Hewlett Packard Appliance Printing Development Kit APDK. See the APDK documentation at http://hpapdk.com for more information.

HPIJS supports all the current HP printer models with different Ghostscript command line parameters. Different printer models can be selected with the IEEE 1284 Manufacturer and Model strings. This information can come from the query of a printer over the parallel or usb port.

The following Ghostscript commands are required when using HPIJS.

  -sDEVICE=ijs
  -sIjsServer=hpijs
  -dIjsUseOutputFD
  -sDeviceManufacturer=x   (x equals: "HEWLETT-PACKARD", "HP", "APOLLO")
  -sDeviceModel=x          (x equals: "DESKJET 990", "DESKJET 670", etc...)
The following Ghostscript commands are optional when using HPIJS.
  -dDuplex=false -dTumble=false (none)
  -dDuplex=true  -dTumble=false (book)
  -dDuplex=true  -dTumble=true  (tablet)

  -sIjsParams="Quality:Quality=n,Quality:ColorMode=n,Quality:MediaType=n,
               Quality:PenSet=n,Quality:FullBleed=n,PS:MediaPosition=n"

      Quality equals: 0=normal (default), 1=draft, 2=best, 3=hires
      ColorMode equals: 0=grey_k, 1=grey_cmy, 2=color (default)
      MediaType equals: 0=plain (default), 1=premium, 2=photo
      PenSet equals: 0=black_pen, 1=color_pen, 2=both_pens, 3=mdl_pen, 4=mdl_both
      FullBleed equals: 0=no (default), 1=yes
      MediaPosition equals: 1=upper_tray, 4=lower_tray, 7=autoselect (default) 
PenSet Definitions
  black_pen: only black pen in the printer
  color_pen: only color pen in the printer
  both_pens: black & color pens in printer
  mdl_pen: photo pen in the printer
  mdl_both: color pin and photo pen in printer
Note, there are defaults for all optional commands. PenSet default is defined by each device class.

The Quality, MediaType, ColorMode, PenSet and FullBleed are used to set the print mode. Not all combinations of Quality, MediaType, ColorMode, PenSet and FullBleed are valid print modes. If an invalid print mode is set, the job will still print, because HPIJS will default to a print mode that makes sense given the input. HPIJS will send any error message to stderr and syslog. Print modes are device class specific, see the following device descriptions for more details.

MediaPosition can be any valid PCL Media Source value. MediaPositon defaults to "autoselect" which means the printer will decide which tray to use. MediaPosition is recognized by DJ9xxVIP, DJGenericVIP and HP LaserJet only. All other device classes ignore this command.

4.1 Device Descriptions

HPIJS is a monolithic driver that supports many different printers. Common printers are divided into different device classes. Each device class share common printer attributes such as print modes and paper sizes. HPIJS will automatically map the DeviceModel parameter to one of the devices classes.

The following devices classes are currently supported by HPIJS. Each device class support 300x300dpi unless specified otherwise. The DeviceModel parameters listed for each device class are case sensitive.

Note, the DeviceModel parameters listed above for each device class are not the full Model string returned by a IEEE 1284 Device ID query. When HPIJS maps the DeviceModel to a device class, the match is wild-carded and trailing characters are ignored.

For example, a Device ID query on a Deskjet 990Cxi will return "DESKJET 990C". If DeviceModel="DESKJET 990C", HPIJS will match to "DESKJET 99", ignore the "0C" and select the DJ9xxVIP device class. See the proxy table for each device class (ie: dj9xxvip.cpp) for a list of model strings and how they are wild-carded.

4.2 Paper Sizes

HPIJS selects the paper size based on the physical paper size determined by Ghostscript. The following standard paper sizes are supported by HPIJS.
                           inches:      postscript units:
  1. Letter               8.5 x 11        612 x 792
  2. Legal                8.5 x 14        612 x 1008
  3. Ledger                11 x 17        792 x 1224
  4. Executive           7.25 x 10.5      522 x 756
  5. A3                 11.69 x 16.53     842 x 1190
  6. A4                  8.27 x 11.69     595 x 842
  7. A5                  5.83 x 8.27      420 x 595
  8. A6                  4.13 x 5.83      297 x 420 
  9. Photo                  4 x 6         288 x 432 
 10. B4                10.126 x 14.342    729 x 1033 
 11. B5                  7.17 x 10.126    516 x 729
 12. Oufuku-Hagaki       5.83 x 7.87      420 x 567
 13. Hagaki              3.94 x 5.83      284 x 420
 14. Super B               13 x 19        936 x 1368
 15. Flsa                 8.5 x 13        612 x 936
If the paper size is not one of the above standard papers sizes HPIJS will default to a custom paper size. Most printers are capable of printing on custom-sized media of any dimension provided it conforms to the minimum and maximum paper size definition in the product specification. For example on a Deskjet 990, the minimum paper size is 3x5 inches and the maximum paper size is 8.5x14 inches.

All device classes support custom papers sizes. Although HPIJS does not explicitly support the following printer models, custom-sized media are not supported on - DJ340, DJ500, DJ500C, DJ510, DJ520, DJ550C and DJ560C.


4.3 Printable Area

Printable area or margins are device class and print mode dependent. For example inkjet products, when Duplex mode is set the top margin is set to 1/2 inch. Normally the top margin is 1/8 inch. Laserjet products do not have different margins during duplex. Printers that support full bleed will require a slightly oversize printable width and height to account for over spray and paper skew.

The printable area values are available over the IJS interface. Ghostscript uses this data during postscript to raster conversion.

The following table lists the physical printable area for all paper sizes supported by HPIJS. Custom (8.5 x 12) is a custom paper size example.

Device Class Paper (inches) Normal Duplex Full Bleed
Left Top Width Height Left Top Width Height Left Top Width Height
DJ350
DJ540
DJ630
DJ6xx
DJ6xxPhoto
AP2xxx
AP21xx
AP2560
Letter (8.5x11) 0.25 0.125 8 10.205 n/a n/a n/a n/a n/a n/a n/a n/a
A4 (8.27x11.69) 0.135 0.125 8 10.895 n/a n/a n/a n/a n/a n/a n/a n/a
Legal (8.5x14) 0.25 0.125 8 13.205 n/a n/a n/a n/a n/a n/a n/a n/a
Photo (4x6) 0.25 0.125 3.5 5.205 n/a n/a n/a n/a n/a n/a n/a n/a
A6 (4.13x5.83) 0.25 0.125 3.63 5.035 n/a n/a n/a n/a n/a n/a n/a n/a
B4 (10.126x14.342) 0.25 0.125 9.626 13.547 n/a n/a n/a n/a n/a n/a n/a n/a
B5 (7.17x10.126) 0.25 0.125 6.67 9.331 n/a n/a n/a n/a n/a n/a n/a n/a
Oufuku-Hagaki (5.83x7.87) 0.25 0.125 5.33 7.075 n/a n/a n/a n/a n/a n/a n/a n/a
Hagaki (3.94x5.83) 0.25 0.125 3.44 5.035 n/a n/a n/a n/a n/a n/a n/a n/a
A3 (11.69x16.53) 0.25 0.125 11.19 15.735 n/a n/a n/a n/a n/a n/a n/a n/a
A5 (5.83x8.27) 0.25 0.125 5.33 7.475 n/a n/a n/a n/a n/a n/a n/a n/a
Ledger (11x17) 0.25 0.125 10.5 16.205 n/a n/a n/a n/a n/a n/a n/a n/a
Super B (13x19) 0.25 0.125 12.5 18.205 n/a n/a n/a n/a n/a n/a n/a n/a
Executive (7.25x10.5) 0.25 0.125 6.75 9.705 n/a n/a n/a n/a n/a n/a n/a n/a
Flsa (8.5x13) 0.25 0.125 8 12.205 n/a n/a n/a n/a n/a n/a n/a n/a
Custom (8.5x12) 0.25 0.125 8 11.205 n/a n/a n/a n/a n/a n/a n/a n/a
DJ8xx
DJ8x5
DJ850
DJ890
DJ3320
Letter (8.5x11) 0.25 0.125 8 10.375 n/a n/a n/a n/a n/a n/a n/a n/a
A4 (8.27x11.69) 0.135 0.125 8 11.065 n/a n/a n/a n/a n/a n/a n/a n/a
Legal (8.5x14) 0.25 0.125 8 13.375 n/a n/a n/a n/a n/a n/a n/a n/a
Photo (4x6) 0.125 0.125 3.75 5.75 n/a n/a n/a n/a n/a n/a n/a n/a
A6 (4.13x5.83) 0.125 0.125 3.88 5.205 n/a n/a n/a n/a n/a n/a n/a n/a
B4 (10.126x14.342) 0.25 0.125 9.626 13.717 n/a n/a n/a n/a n/a n/a n/a n/a
B5 (7.17x10.126) 0.25 0.125 6.67 9.5 n/a n/a n/a n/a n/a n/a n/a n/a
Oufuku-Hagaki (5.83x7.87) 0.25 0.125 5.33 7.37 n/a n/a n/a n/a n/a n/a n/a n/a
Hagaki (3.94x5.83) 0.125 0.125 3.69 5.58 n/a n/a n/a n/a n/a n/a n/a n/a
A3 (11.69x16.53) 0.2 0.125 11.29 15.905 n/a n/a n/a n/a n/a n/a n/a n/a
A5 (5.83x8.27) 0.125 0.125 5.58 7.645 n/a n/a n/a n/a n/a n/a n/a n/a
Ledger (11x17) 0.2 0.125 10.6 16.375 n/a n/a n/a n/a n/a n/a n/a n/a
Super B (13x19) 0.2 0.125 12.6 18.375 n/a n/a n/a n/a n/a n/a n/a n/a
Executive (7.25x10.5) 0.25 0.125 6.75 9.875 n/a n/a n/a n/a n/a n/a n/a n/a
Flsa (8.5x13) 0.25 0.125 8 12.375 n/a n/a n/a n/a n/a n/a n/a n/a
Custom (8.5x12) 0.25 0.125 8 11.375 n/a n/a n/a n/a n/a n/a n/a n/a
DJ9xx
DJ9xxVIP
Letter (8.5x11) 0.25 0.125 8 10.375 0.25 0.5 8 10 n/a n/a n/a n/a
A4 (8.27x11.69) 0.135 0.125 8 11.065 0.135 0.5 8 10.69 n/a n/a n/a n/a
Legal (8.5x14) 0.25 0.125 8 13.375 0.25 0.5 8 13 n/a n/a n/a n/a
Photo (4x6) 0.125 0.125 3.75 5.75 0.125 0.5 3.75 5 n/a n/a n/a n/a
A6 (4.13x5.83) 0.125 0.125 3.88 5.205 0.125 0.5 3.88 4.83 n/a n/a n/a n/a
B4 (10.126x14.342) 0.25 0.125 9.626 13.717 0.25 0.5 9.626 13.342 n/a n/a n/a n/a
B5 (7.17x10.126) 0.25 0.125 6.67 9.5 0.25 0.5 6.67 9.126 n/a n/a n/a n/a
Oufuku-Hagaki (5.83x7.87) 0.25 0.125 5.33 7.37 0.25 0.5 5.33 6.87 n/a n/a n/a n/a
Hagaki (3.94x5.83) 0.125 0.125 3.69 5.58 0.125 0.5 3.69 4.83 n/a n/a n/a n/a
A3 (11.69x16.53) 0.2 0.125 11.29 15.905 0.2 0.5 11.29 15.53 n/a n/a n/a n/a
A5 (5.83x8.27) 0.125 0.125 5.58 7.645 0.125 0.5 5.58 7.27 n/a n/a n/a n/a
Ledger (11x17) 0.2 0.125 10.6 16.375 0.2 0.5 10.6 16 n/a n/a n/a n/a
Super B (13x19) 0.2 0.125 12.6 18.375 0.2 0.5 12.6 18 n/a n/a n/a n/a
Executive (7.25x10.5) 0.25 0.125 6.75 9.875 0.25 0.5 6.75 9.5 n/a n/a n/a n/a
Flsa (8.5x13) 0.25 0.125 8 12.375 0.25 0.5 8 12 n/a n/a n/a n/a
Custom (8.5x12) 0.25 0.125 8 11.375 0.25 0.5 8 11 n/a n/a n/a n/a
DJ3600 Letter (8.5x11) 0.25 0.125 8 10.375 n/a n/a n/a n/a 0.25 0.125 8 10.375
A4 (8.27x11.69) 0.135 0.125 8 11.065 n/a n/a n/a n/a 0.135 0.125 8 11.065
Legal (8.5x14) 0.25 0.125 8 13.375 n/a n/a n/a n/a 0.25 0.125 8 13.375
Photo (4x6) 0.125 0.125 3.75 5.75 n/a n/a n/a n/a 0 0 4.216 6.174
A6 (4.13x5.83) 0.125 0.125 3.88 5.205 n/a n/a n/a n/a 0 0 4.346 5.33
B4 (10.126x14.342) 0.25 0.125 9.626 13.717 n/a n/a n/a n/a 0.25 0.125 9.626 13.717
B5 (7.17x10.126) 0.25 0.125 6.67 9.5 n/a n/a n/a n/a 0.25 0.125 6.67 9.5
Oufuku-Hagaki (5.83x7.87) 0.25 0.125 5.33 7.37 n/a n/a n/a n/a 0 0 6.046 7.37
Hagaki (3.94x5.83) 0.125 0.125 3.69 5.58 n/a n/a n/a n/a 0 0 4.156 5.33
A3 (11.69x16.53) 0.2 0.125 11.29 15.905 n/a n/a n/a n/a 0.2 0.125 11.29 15.905
A5 (5.83x8.27) 0.125 0.125 5.58 7.645 n/a n/a n/a n/a 0.125 0.125 5.58 7.645
Ledger (11x17) 0.2 0.125 10.6 16.375 n/a n/a n/a n/a 0.2 0.125 10.6 16.375
Super B (13x19) 0.2 0.125 12.6 18.375 n/a n/a n/a n/a 0.2 0.125 12.6 18.375
Executive (7.25x10.5) 0.25 0.125 6.75 9.875 n/a n/a n/a n/a 0.25 0.125 6.75 9.875
Flsa (8.5x13) 0.25 0.125 8 12.375 n/a n/a n/a n/a 0.25 0.125 8 12.375
Custom (8.5x12) 0.25 0.125 8 11.375 n/a n/a n/a n/a 0.25 0.125 8 11.375
DJGenericVIP Letter (8.5x11) 0.25 0.125 8 10.375 0.25 0.5 8 10 0.25 0.125 8 10.375
A4 (8.27x11.69) 0.135 0.125 8 11.065 0.135 0.5 8 10.69 0.135 0.125 8 11.065
Legal (8.5x14) 0.25 0.125 8 13.375 0.25 0.5 8 13 0.25 0.125 8 13.375
Photo (4x6) 0.125 0.125 3.75 5.75 0.125 0.5 3.75 5 0 0 4.12 6.06
A6 (4.13x5.83) 0.125 0.125 3.88 5.205 0.125 0.5 3.88 4.83 0 0 4.25 5.33
B4 (10.126x14.342) 0.25 0.125 9.626 13.717 0.25 0.5 9.626 13.342 0.25 0.125 9.626 13.717
B5 (7.17x10.126) 0.25 0.125 6.67 9.5 0.25 0.5 6.67 9.126 0.25 0.125 6.67 9.5
Oufuku-Hagaki (5.83x7.87) 0.25 0.125 5.33 7.37 0.25 0.5 5.33 6.87 0 0 5.95 7.37
Hagaki (3.94x5.83) 0.125 0.125 3.69 5.58 0.125 0.5 3.69 4.83 0 0 4.06 5.33
A3 (11.69x16.53) 0.2 0.125 11.29 15.905 0.2 0.5 11.29 15.53 0.2 0.125 11.29 15.905
A5 (5.83x8.27) 0.125 0.125 5.58 7.645 0.125 0.5 5.58 7.27 0.125 0.125 5.58 7.645
Ledger (11x17) 0.2 0.125 10.6 16.375 0.2 0.5 10.6 16 0.2 0.125 10.6 16.375
Super B (13x19) 0.2 0.125 12.6 18.375 0.2 0.5 12.6 18 0.2 0.125 12.6 18.375
Executive (7.25x10.5) 0.25 0.125 6.75 9.875 0.25 0.5 6.75 9.5 0.25 0.125 6.75 9.875
Flsa (8.5x13) 0.25 0.125 8 12.375 0.25 0.5 8 12 0.25 0.125 8 12.375
Custom (8.5x12) 0.25 0.125 8 11.375 0.25 0.5 8 11 0.25 0.125 8 11.375
PS100 Letter (8.5x11) 0.125 0.125 3.88 5.205 n/a n/a n/a n/a 0 0 4.25 5.33
A4 (8.27x11.69) 0.125 0.125 3.88 5.205 n/a n/a n/a n/a 0 0 4.25 5.33
Legal (8.5x14) 0.125 0.125 3.88 5.205 n/a n/a n/a n/a 0 0 4.25 5.33
Photo (4x6) 0.125 0.125 3.75 5.75 n/a n/a n/a n/a 0 0 4.12 6.06
A6 (4.13x5.83) 0.125 0.125 3.88 5.205 n/a n/a n/a n/a 0 0 4.25 5.33
B4 (10.126x14.342) 0.125 0.125 3.88 5.205 n/a n/a n/a n/a 0 0 4.25 5.33
B5 (7.17x10.126) 0.125 0.125 3.88 5.205 n/a n/a n/a n/a 0 0 4.25 5.33
Oufuku-Hagaki (5.83x7.87) 0.125 0.125 3.88 5.205 n/a n/a n/a n/a 0 0 4.25 5.33
Hagaki (3.94x5.83) 0.125 0.125 3.69 5.58 n/a n/a n/a n/a 0 0 4.06 5.33
A3 (11.69x16.53) 0.125 0.125 3.88 5.205 n/a n/a n/a n/a 0 0 4.25 5.33
A5 (5.83x8.27) 0.125 0.125 3.88 5.205 n/a n/a n/a n/a 0 0 4.25 5.33
Ledger (11x17) 0.125 0.125 3.88 5.205 n/a n/a n/a n/a 0 0 4.25 5.33
Super B (13x19) 0.125 0.125 3.88 5.205 n/a n/a n/a n/a 0 0 4.25 5.33
Executive (7.25x10.5) 0.125 0.125 3.88 5.205 n/a n/a n/a n/a 0 0 4.25 5.33
Flsa (8.5x13) 0.125 0.125 3.88 5.205 n/a n/a n/a n/a 0 0 4.25 5.33
Custom (8.5x12) 0.125 0.125 3.88 5.205 n/a n/a n/a n/a 0 0 4.25 5.33
LJMono
LJColor
Letter (8.5x11) 0.25 0.2 8 10.6 0.25 0.2 8 10.6 n/a n/a n/a n/a
A4 (8.27x11.69) 0.25 0.2 7.77 11.29 0.25 0.2 7.77 11.29 n/a n/a n/a n/a
Legal (8.5x14) 0.25 0.2 8 13.6 0.25 0.2 8 13.6 n/a n/a n/a n/a
Photo (4x6) 0.25 0.2 3.5 5.6 0.25 0.2 3.5 5.6 n/a n/a n/a n/a
A6 (4.13x5.83) 0.25 0.2 3.63 5.43 0.25 0.2 3.63 5.43 n/a n/a n/a n/a
B4 (10.126x14.342) 0.25 0.2 9.626 13.942 0.25 0.2 9.626 13.942 n/a n/a n/a n/a
B5 (7.17x10.126) 0.25 0.2 6.67 9.726 0.25 0.2 6.67 9.726 n/a n/a n/a n/a
Oufuku-Hagaki (5.83x7.87) 0.25 0.2 5.33 7.47 0.25 0.2 5.33 7.47 n/a n/a n/a n/a
Hagaki (3.94x5.83) 0.25 0.2 3.44 5.43 0.25 0.2 3.44 5.43 n/a n/a n/a n/a
A3 (11.69x16.53) 0.25 0.2 11.19 16.13 0.25 0.2 11.19 16.13 n/a n/a n/a n/a
A5 (5.83x8.27) 0.25 0.2 5.33 7.87 0.25 0.2 5.33 7.87 n/a n/a n/a n/a
Ledger (11x17) 0.25 0.2 10.5 16.6 0.25 0.2 10.5 16.6 n/a n/a n/a n/a
Super B (13x19) 0.25 0.2 12.5 18.6 0.25 0.2 12.5 18.6 n/a n/a n/a n/a
Executive (7.25x10.5) 0.25 0.2 6.75 10.1 0.25 0.2 6.75 10.1 n/a n/a n/a n/a
Flsa (8.5x13) 0.25 0.2 8 12.6 0.25 0.2 8 12.6 n/a n/a n/a n/a
Custom (8.5x12) 0.25 0.2 8 11.6 0.25 0.2 8 11.6 n/a n/a n/a n/a

Left edge, Top edge, Width and Height values are in inches. "n/a" means option is not available.


5 Updates


6 Installation

HPIJS is not spooler specific, but the Common Unix Printing System (CUPS) is probably the best supported spooler system. Foomatic is a database-driven system for integrating free software printer drivers with common spoolers such as CUPS. Both CUPS and Foomatic are supported by most Linux and Unix distributions. See cups.org for more information about CUPS and Foomatic.

Starting with HPIJS 1.4, HPIJS has built-in support for CUPS and Foomatic. CUPS and Foomatic support is optional via "configure" options.

This section addresses how to install HPIJS. In most cases this is all you need to do. If your current copy of Ghostscript does not support HPIJS you will need to update Ghostscript.

This section includes instructions for compiling Ghostscript from source code, but this is not an easy task. Before attempting to update Ghostscript, check with your distribution, they may have a Ghostscript update with the latest HPIJS support.

This section will show you how to install HPIJS for a CUPS system using Foomatic. This section does not address other spoolers or how to use HPIJS with your spooler. See your distribution about spooler questions. Additional information is available at www.linuxprinting.org and hpinkjet.sourceforge.net.

6.1 HP Inkjet Driver

You can download HPIJS here. The download includes the HPIJS source code and a platform-independent automake/autoconf makefile. The makefile will compile and install hpijs. By default the makefile will also do a Foomatic and CUPS install. After downloading to your directory use the following instructions.
# tar xzvf hpijs-1.x.tar.gz
# cd hpijs-1.x
# ./configure
# make
# make install
# killall -HUP cupsd
The Foomatic install will (1) copy HP HPIJS PPD files to /(prefix)/share/ppd/HP (2) copy foomatic-rip to /(prefix)/bin (3) gzip all PPD files.

The CUPS install will (1) remove any old HP HPIJS PPD files from the CUPS PPD directory (2) symlink the HP HPIJS PPD files to the CUPS PPD directory (3) symlink foomatic-rip to the CUPS filter directory.

The "killall -HUP cupsd" will cause the CUPS daemon to re-read all the PPD files in the PPD directory.

If you do not want Foomatic and CUPS install use the following commands instead.

# ./configure --disable-foomatic-install
# make
# make install
You can verify HPIJS was build and installed correctly with the following command.
# hpijs -h

Hewlett-Packard Co. Inkjet Server 1.x
Copyright (c) 2001-2002, Hewlett-Packard Co.
This is all you need to do to install HPIJS. If your current Ghostscript supports the IJS interface you are done. If you are not sure the Ghostscript Install section will show you how to verify IJS interface support.

6.2 Ghostscript

Your current Ghostscript may already support HPIJS. You can verify this with the gs -h command. You should see output similar to this.

GNU Ghostscript 7.05 (2002-04-22)
Copyright (C) 2002 artofcode LLC, Benicia, CA.  All rights reserved.
Usage: gs [switches] [file1.ps file2.ps ...]
Most frequently used switches: (you can use # in place of =)
 -dNOPAUSE           no pause after page   | -q       `quiet', fewer messages
 -gx  page size in pixels   | -r  pixels/inch resolution
 -sDEVICE=  select device         | -dBATCH  exit after last file
 -sOutputFile= select output file: - for stdout, |command for pipe,
                                         embed %d or %ld for page #
Input formats: PostScript PostScriptLevel1 PostScriptLevel2 PDF
Available devices:
   x11 x11alpha x11cmyk x11gray2 x11gray4 x11mono bmpmono bmpgray bmpsep1
   bmpsep8 bmp16 bmp256 bmp16m bmp32b deskjet djet500 laserjet ljetplus
   ljet2p ljet3 ljet3d ljet4 ljet4d lj5mono lj5gray cdeskjet cdjcolor
   cdjmono cdj550 pj pjxl pjxl300 uniprint ijs bj10e bj200 bjc600 bjc800
   faxg3 faxg32d faxg4 pcxmono pcxgray pcx16 pcx256 pcx24b pcxcmyk pbm
   pbmraw pgm pgmraw pgnm pgnmraw pnm pnmraw ppm ppmraw pkm pkmraw pksm
   pksmraw tiffcrle tiffg3 tiffg32d tiffg4 tifflzw tiffpack tiff12nc
   tiff24nc psmono psgray psrgb bit bitrgb bitcmyk png16m pnggray pngmono
   png256 png16 jpeg jpeggray pdfwrite pswrite epswrite pxlmono pxlcolor
   cljet5 cljet5c nullpage
Search path:
   . : /usr/share/ghostscript/7.05/lib : /usr/share/ghostscript/fonts
For more information, see /usr/share/ghostscript/7.05/doc/Use.htm.
Report bugs to bug-gs@ghostscript.com, using the form in Bug-form.htm.
If you don't see the above highlighted "ijs" device your version of Ghostscript does not have built-in support for HPIJS.

If Ghostscipt does not support HPIJS, check with your distribution and see if they have a Ghostsript update.

If necessary, the following instructions show you how to build GNU Ghostscipt 7.05. Other versions of Ghostscript are built in a similar manor. GNU Ghostscript 6.53 or higher will have built-in support for the IJS interface.

  1. Download the source code for gs, jpeg, png and zlib into the following directories respectfully. See the GNU Ghostscript documentation for more information. You can create this directory structure in your user directory. Be sure to use the following directory names for jpeg, libpng and zlib.
    ../gs7.05/
    ../gs7.05/jpeg/
    ../gs7.05/libpng/
    ../gs7.05/zlib/
    
  2. Ghostscript looks for fonts in hardcoded directories, see GS_LIB_DEFAULT in the makefile. For Red Hat the following symbolic link will allow Ghostscript to find fonts with out modifying the makefile. Other distributions may have different font directories.

    # ln -s /usr/share/fonts/default/Type1 /usr/share/ghostscript/fonts
    
  3. Now build and install Ghostscript by running the following commands in the Ghostscript directory.
    # ./configure --prefix=/usr
    # make
    # make install
    
  4. Now run the gs -h command, you should see the ijs device name.

6.3 PrintTool

If you use PrintTool (ie: RH6.2 and RH7.0) and you want PrintTool to recognize the new ijs device add the following lines to /usr/lib/rhs/rhs-printfilters/printerdb file.
StartEntry: IJS
  GSDriver: ijs
  Description: {IJS Client}
  About: { \
           This is a generalized IJS client interface for ghostscript printer \
           drivers. Different drivers and options are specified in the \
           "Extra GS options" box. The following ghostscript commands are used by the \
           HP Inkjet Driver (HPIJS): -sIjsServer=hpijs, \
           -sDeviceManufacturer="HEWLETT-PACKARD", \
           -dIjsUseOutputFD, -sDeviceModel=model, -dDuplex, -dTumble, -sIjsParams=options. \
           Where DeviceModel equals one of the following: "DESKJET 990", "DESKJET 970", etc... \
           -dDuplex equals book, -dDuplex -dTumble equals tablet. \
           IjsParams can be any of the following: Quality=n, MediaType=n, ColorMode=n, PenSet=n. \
           Where Quality equals one of the following: 0=normal (default), 1=draft, 2=best. \
           MediaType equals one of the following: 0=plain (default), 1=premium, 2=photo. \
           ColorMode equals one of the following: 0=grey_k, 1=grey_cmy, 2=color (default). \
           PenSet equals one of the following:  0=black_pen, 1=color_pen, 2=both_pens, \
           3=mdl_pen, 4=mdl_both. \
           Not all combinations of Quality, MediaType and ColorMode are valid print modes. \
           Resolution setting 600x600 is available for some print modes only. \
           In printtool special characters must be preceded by a double backslash see the \ 
           following example for HP 990C: -sIjsServer=hpijs -sDeviceManufacturer=\\"HEWLETT-PACKARD\\" \
           -dIjsUseOutputFD -sDeviceModel=\\"DESKJET 990C\\". \ 
         }
  Resolution: {300} {300} {}
  Resolution: {600} {600} {}
EndEntry
In PrintTool special characters must be preceded by a double backslash (see example above). Note, PrintTool has a problem with double backslash. PrintTool allows you to set double backslash, but it will only read one backslash back when editing. This means if you are editing the Extra GS options you must re-enter the double backslash.


7 Usage

7.1 Spooler Example

The following command will print a postscript file to the lp0 spooler.

$ lpr -Plp0 tiger.ps

Most applications use the lpr command to print documents.

7.2 Ghostscript Example

Here is a Ghostscript example using our driver on a 990C deskjet from the command line. This command bye passes the spooler and prints directly to the printer. You must be logged in as root in order direct the output directly to /dev/lp0.
$ gs -sDEVICE=ijs -sIjsServer=hpijs -dIjsUseOutputFD -sDeviceManufacturer="HEWLETT-PACKARD" \
  -sDeviceModel="DESKJET 990" -r300 -dNOPAUSE -dSAFER -sOutputFile="/dev/lp0" file.ps -c quit
This command line example shows how to print a 4x6 inch photo from a digital camera.
$ convert -rotate 90 p8160010.jpg p8160010.png
$ convert -page 324x432-18+0 p8160010.png photo.ps
$ gs -sDEVICE=ijs -sIjsServer=hpijs -dIjsUseOutputFD -sDeviceManufacturer="HEWLETT-PACKARD" \
  -sDeviceModel="DESKJET 990" -r300 -dNOPAUSE -dSAFER -sOutputFile="/dev/lp0" \
  -dDEVICEWIDTHPOINTS=288 -dDEVICEHEIGHTPOINTS=432 photo.ps -c quit
The first command rotates the picture 90 degrees and converts from jpg to png. The second command converts the png to postscript and scales the image to 4.5x6 inches. The original photo was 1280x960 pixels. In order to keep the same aspect ratio as the original photo, the second command scales to 4.5x6 instead of 4x6 inches. The means we need to clip the top and bottom (x axis) by 0.25 inches. Ghostscript parameters DEVICEWIDTHPOINTS=288 and DEVICEHEIGHTPOINTS=432 specify the actual paper size in postscript units, which in this case represents 4x6 inches (288=4*72, 432=6*72).

Similar to the above example, here is a 4x6 full bleed (borderless) photo printing example using the Photosmart 100.

$ convert -rotate 90 p8160010.jpg p8160010.png
$ convert -page 324x432-18+0 p8160010.png photo.ps
$ gs -sDEVICE=ijs -sIjsServer=hpijs -dIjsUseOutputFD -sDeviceManufacturer="HEWLETT-PACKARD" \
  -sDeviceModel="PHOTOSMART 100" -r600 -sIjsParams="Quality:FullBleed=1" -dNOPAUSE -dSAFER \
  -sOutputFile="/dev/usb/lp0" -dDEVICEWIDTHPOINTS=288 -dDEVICEHEIGHTPOINTS=432 photo.ps -c quit


David Suffield
© 2001-2003 Hewlett-Packard Company
HPIJS 1.5, last updated September 25, 2003