From: Allen Barnett To: "hpoj-devel@lists.sourceforge.net" Subject: [hpoj-devel] Adding HPIJS Support with HPOJ in RedHat 7.1 Date: Tue, 04 Sep 2001 08:29:35 -0400 Hi, Attached is a prescription for adding HP InkJet driver support to RedHat 7.1. It requires some rather complicated modifications to your setup, but since a couple of other people have followed it with reasonable success, I thought I'd go ahead and post it. This information is provided without warranty of any kind. Remember to backup all files before modifying them. Your safest bet is backup the entire /usr/share/printconf directory hierarchy. Reports of success or failure are welcome. Allen --------------------- Copyright (c) 2001 lignum Computing, Inc. Edited slightly by David Paschal Note: this information is provided without warranty of any kind. Here is a recipe for adding support for the HP InkJet drivers to RedHat 7.1. This is problematic for two reasons: (1) In RedHat 7.1, the printer configuration system uses LPRng/Foomatic/MagicFiler rather than LPD, while the availble RPMs are for LPD, and (2) the printer configuration tool (printconf-gui, aka printtool) is completely different from 7.0 and earlier and it uses a 'compiled' database rather than a flat file to store printer information. So, take a deep breath and remember to backup any files before overwriting them and also, remember to backup any files before overwriting them: 0. Download and install the RPMs for RedHat 7 from http://sourceforge.net/project/showfiles.php?group_id=16846&release_id=38493 ghostscript-hpijs-5.50-5.rh7.i386.rpm hpijs-0.97-1.rh7.i386.rpm You will probably have to --force the installation of ghostscript-hpijs since it overwrites the current installation of Ghostscript. 1. Go to the supported devices page at http://hpoj.sourceforge.net/suplist.shtml and determine which driver is appropriate for your OfficeJet. For the sake of concreteness, we'll consider the G85. This OJ uses the DJ9xx driver, which is one of the "hpijs" drivers from http://hpinkjet.sourceforge.net. 2. Go to "http://www.linuxprinting.org/show_driver.cgi?driver=hpijs". 3. Below the text "LPD-O-Matic automagic LPD configuration generator", select your printer, such as "HP OfficeJet G85", and press the "Generate desc file" button. This will take you to a foomatic printer description. Save this page to a file. The name of the file is important: it must be of the form devicename-drivername.foo. For this case, I called it HP-OfficeJet_G85-DJ9xx.foo. Check in the directory /usr/share/printconf/foomatic/data to get the correct punctuation of your OJ's name (i.e., where it uses underscores and where it uses hyphens). 4. Copy this file to /usr/share/printconf/foomatic/data. 5. After making a backup of it, edit the file "/usr/share/printconf/foomatic/data/00-overview.foo". Find the section for your OJ and add the DJxxx driver name to the Perl array of driver namess. For the G85, this looks like (see the line with <<<<< on it): { 'pnp_cmd' => undef, 'model' => 'OfficeJet G85', 'pnp_mfg' => undef, 'notes' => 'Multifunction device: print/copy/scan/fax.

PC faxing not yet supported.

Same as an OfficeJet G55, but with an automatic document feeder (ADF) and fax capability. See that printer\'s entry for scanning and other driver information.', 'pnp_des' => undef, 'pnp_mdl' => undef, 'func' => 'D', 'id' => 421906, 'verified' => '0', 'drivers' => [ 'DJ9xx', # <<<<< Added this entry first (followed by a comma) 'cdj550' ] }, Note, too, you might want to resolve any differences in 'pnp_des', 'pnp_mdl', etc., between the entry in 00-overview.foo and the device file (from step 3). 6. Also in /usr/share/printconf/foomatic/data, you need to make sure there is a symbolic link which relates the driver to the device. Note the 'id' field in the 00-overview.foo file. For the G85, it is 421906. Issue a command like: ln -s HP-OfficeJet_G85-DJ9xx.foo DJ9xx-421906.foo replacing the target (i.e., the argument after -s) with name of the file you created in step 3 and the link with a name of the form drivername-id.foo. 7. Change directory to /usr/share/printconf/util Create a file called "list_devices.ps" and add these two lines to it: devicenames { = } forall quit and then run ghostscript like this: gs -q -sDEVICE=nullpage list_devices.ps > device-list This will create a list of devices which Ghostscript knows about. Check this file to make sure that the "hpijs" driver appears in it. If not, then the ghostscript-hpijs RPM is not installed correctly. 8. cd up a level to /usr/share/printconf and rename the file printer_db.pickle to printer_db.pickle.old Now, you need to regenerate this file using the modifications you made to the foomatic/data directory. This is accomplished by running the command (all on one command line, don't actually include the backslash character): ./util/build_striped_printer_db.py foomatic/data foomatic/rh-data \ printer_db.pickle util/device-list Perform a sanity check on printer_db.pickle by grepping for your model name; for example: grep 'OfficeJet G85' printer_db.pickle 9. You should now be able to run printconf-gui (aka printtool) and create a new print queue which uses the OfficeJet and driver you just created an entry for. Don't forget to look at the 'Driver Options' panel in the 'Edit Queue' dialog to select the desired printing resolution.