Note: This guide only applies to the HP 710c,720c,722c,820Cse,820Cxi,1000Cse,1000Cxi printers. Once Ghostscript + Fonts and CUPS are installed, other HP printers will likely only need setting up.
The above series of printers, sometimes known as 'winprinters', requires extra software for them to function in Linux. This guide gives details on how to set up such a printer in Linux using CUPS.
If you are a confident Linux user, then you may want to refer to the summary for the impatient at the bottom. If you are less used to installing Linux software, then you may want to read the full guide.
My machine runs Slackware 9.0, (a fairly standard Linux distribution) and a Hewlett Packard 720C printer.
To save money on processing hardware inside the printer, HP devised a system where part of the processing was done on the host computer and the printer was fed the result. The processing software for these printers were released for Windows and Macintosh only. After realising this wasn't such a great idea, HP discontinued this series of printers. Linux users were confounded because HP weren't interested in developing and supporting new software for this, essentially, short-lived series of printers and furthermore were even more reluctant to reveal its colour processing technology to the open source community.
Fortunately, open-source programmers have come to the rescue and have developed the software necessary to use these printers in Linux.
The following software needs to be installed.
Ghostscript and Ghostscript fonts are usually already installed on Linux systems. Type
gs -version at a terminal, if you get a version number then Ghostscript is installed. To see if you have the fonts installed, find your ghostscript directory using
locate and check the directory within that called
fonts. If this exisits and has plenty of fonts in this directory (mine has about 160 files), then the chances are that the Ghostscript Fonts are installed.
locate to search for
cupsd. If you have it on your system, chances are that cups is installed. To check, change to
root and run
cupsd, then visit http://localhost:631 in your web browser. If you get a webpage, then cups is installed. To see if you have the PPD driver for your printer,
locate the cups directory and look through the files under the
model directory. Do a
locate for cupsomatic to see if this is installed.
Finally, for pnm2ppa, type
which pnm2ppa since it should be in your path. If nothing comes up, chances are that you don't have it on your system
The software can be typically found in the following places for Slackware.
If you have all this software installed, then you can skip to the last section. You lucky thing.
Note: most of the rest of these commands need to be done as 'root'.
CUPS in brief, organises printing jobs. Although it comes with more features than the average user needs, it is useful if you want to, say set up network printing.
Slackware 9.0 comes with CUPS in the extras directory, many other distributions come with CUPS too. If yours doesn't, download and compile the CUPS source from the CUPS website.
This should be a case of unpacking the downloaded archive,
tar -zxvf cups-XXX-X-source.tar.gz changing to the unpacked directory then typing the usual...
./configure make make install
Ghostscript converts a file into a format understood by most printers, or in this case a standard bitmap format which can be understood by a filter (pnm2ppa). Ghostscript essential for most Linux printing and so is almost always installed by default. If not check your installation cd's to see if you can find it, ready compiled for you system. If not, then you can download this from the CUPS website as source. To install, do the same as you did for CUPS above.
You will also need Ghostscript fonts which are also available for download from the CUPS website. The fonts, once unpacked using,
tar -zxvf <filename.tar.gz> need to be copied into a directory names 'fonts' in the ghostscript directory. Make sure they have the correct permissions by changing to the fonts directory and typing,
chmod 644 *
pnm2ppa is the filter that translates the bitmap generated by Ghostscript to the language understood by the HP winprinters. It can be downloaded at the following address.
Once downloaded unpack using,
tar -zxvf pnm2ppa-XXX.tar.gz and change into the folder and type the following.
make make install
Edit the file /etc/pnm2ppa.conf in your favourite text editor. Comment out the line that starts version ERROR i.e. place a # infront of it. Then uncomment the line below that corresponds to your printer i.e. delete the first # on the line.
You need to make sure that pnm2ppa is on your path. Type
which pnm2ppa, if there is no error returned then it is successfully installed. If not, then for some reason it hasn't installed on the path. Type
echo $PATH to see if /usr/local/bin is there, if not then add the following line to the file
.bashrc in your home directory...
If it still doesn't work, then do
locate pnm2ppa. If you locate it somewhere other than /usr/local/bin, then
mv it there.
foomatic-rip and foomatic-gswrapper are scripts that glue all the components of the printing system together...I think ;-) In any case they are necessary for your printer to work.
They can be downloaded from the addresss below.
They are Perl scripts that need
mv'ing to /usr/local/bin. Once that has been done, you need to set them as executable by typing...
cd /usr/local/bin chmod 775 foomatic-rip foomatic-wrapper
Finally, foomatic-rip needs to be linked from the cups filter folder. i.e.
ln -s /usr/local/bin/foomatic-rip /usr/lib/cups/filter/foomatic-rip
You then need to install a PPD driver. Go to the link below.
Here there is a form called PPD-O-Matic. Select your printer in the pull-down menu and click 'Generate PPD File'. The page generated suggests what you should save the file as a few lines down. (Click, 'File' menu in the top left, then 'Save As' in order to do this.)
Change to the 'model' directory in the 'cups' directory. On my system this is /usr/share/cups/model. Then copy the .ppd file into it.
Make sure that the permissions are correct for the file.
chmod 644 /usr/share/cups/model/HP-Deskjet_XXXC-pnm2ppa-ppd.ppd
There are many ways to setup your printer, each distribution has its own tool. Redhat has printtool, Slackware has apsfilter KDE also has a setup program in the Control Centre under System --> Printing Manager. I will guide you through setting up the CUPS way since is is the only sure common factor.
CUPS uses a web-based interface to setup its printers. First make sure that the CUPS daemon is running. Type the following.
Then open your favorite web browser and type in the address http://localhost:631/. You should see a webpage with various link options. Click 'Manage Printers' then the 'Add Printer' button and various text boxes in a 'wizard' style interface detailed below.
The following software needs to be installed.
Open /etc/pnm2ppa.conf and comment the line that begins Version ERROR, uncomment the line corresponding to your printer. Make sure pnm2ppa is on your path.
Make sure the ghostscript fonts, once installed, have permissions as 644.
Copy foomatic scripts to /usr/local/bin and make executable. Soft link foomatic-rip into the cups filter dirctory.
Go to the address below, select your printer in the PPD-O-Matic and save the resulting file using the name it suggests a few lines into the driver file. Place this file in the cups/model directory and set permissions to 644.
Start the CUPS daemon by typing
/usr/sbin/cupsd& then access the CUPS configuration tool by typing the URL http://www.localhost:631/ in your web browser.