Abstract
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.
Background
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 software
The following software needs to be installed.
- Ghostscript
- Ghostscript Fonts
- CUPS
- foomatic-rip and foomatic-gswrapper (wrappers for CUPS.)
- CUPS PPD driver for you printer.
- pnm2ppa (a filter for Ghostscript, key for these printers.)
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.
Next, use 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.
- Ghostscript & Ghostscript Fonts
- /usr/share/ghostscript & /usr/share/ghostscript/fonts
- pnm2ppa
- /usr/local/bin/pnm2ppa
- CUPS
- /usr/share/cups
- foomatic-rip & foomatic-gswrapper
- /usr/local/bin or somewhere else in your path.
- CUPS PPD driver for your printer
- /usr/share/cups/model/HP-Deskjet_XXXC-pnm2ppa-ppd.ppd
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'.
Installing CUPS.
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
Installing Ghostscript & Ghostscript Fonts
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 *
Installing pnm2ppa
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...
export PATH=$PATH:/usr/local/bin
If it still doesn't work, then do updatedb
then locate pnm2ppa
. If you locate it somewhere other than /usr/local/bin, then mv
it there.
Installing foomatic-gswrapper & foomatic-rip
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.
- http://www.linuxprinting.org/download.cgi?filename=foomatic-rip&show=0
- http://www.linuxprinting.org/download.cgi?filename=foomatic-gswrapper&show=0
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
Installing CUPS PPD drivers.
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
Setting up your printer
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.
/usr/sbin/cupsd &
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.
- Page 1 - Add New Printer
- Name: The only compulsory field. No spaces and strange characters allowed. I used hp720c for my printer.
- Location: The physical location, i.e. Computer room 2. Useful really for large networks.
- Description: A fuller description than 'Name'. i.e. HP Deskjet 720C.
- Page 2 - Device for <Name>
- Device: Select the device through which your printer is connected. This is Parallel Port#1 (HEWLETT-PACKARD DESKJET 720C) on my system. Note: if your printer uses USB, appropriate kernel modules need to be loaded.
- Page 3 - Model/Driver for <Name>
- Make/Model: Choose your make (HP) and model. Your Driver should show up if it is correctly installed.
- Page 4 - FINISH!
- Your printer can now be accessed by typing http://localhost:631/printers/<Name> in the browser. So for me it was http://localhost:631/printers/hp720c. From here, further configuration as well as a test page can be printed.
Summary for the impatient
The following software needs to be installed.
- Ghostscript (http://www.cups.org/software.html)
- Ghostscript Fonts (http://www.cups.org/software.html)
- pnm2ppa (http://sourceforge.net/projects/pnm2ppa/)
- CUPS (http://www.cups.org/software.html)
- foomatic-rip (http://www.linuxprinting.org/download.cgi?filename=foomatic-rip&show=0)
- foomatic-gswrapper (http://www.linuxprinting.org/download.cgi?filename=foomatic-gswrapper&show=0)
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.
- CUPS PPD driver for you printer. (http://www.linuxprinting.org/show_driver.cgi?driver=pnm2ppa)
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.