Getting Windows-Based Printers to Work With Linux

My own saga should prove educational. I wanted to use the Canon iP3000 photo printer, part of the company's PIXMA printer series. But I was unable to find a Linux driver for the iP3000 at the Canon USA site. This oversight seems to be fairly representative: LinuxPrinting.org, a site that provides resources for printing with open-source systems, keeps a vendor scorecard on which it calls Canon "average." In other words, the Linux drivers do exist for this printer, but they're hard to find.

Next I discovered that the matching print driver isn't built into the CUPS (Common Unix Printing System) portable printing layer, so I checked the Canon site again and did some more digging. Because Linux drivers are frequently in out-of-the-way places on a vendor site, searching under Linux [model name] on the site&'s internal search engine sometimes works.

Linux drivers frequently don&'t make it to the Linux printing database. That happens when a vendor has a driver it's unwilling to publish under the GPL (General Public License--freeware license under specific terms and conditions), which would generally keep the driver off LinuxPrinting.org. Alternatively, the vendor may have a GPL'd driver that simply never made it to LinuxPrinting.org. That turned out to be the case for my Canon printer.

My next step was to go to LinuxPrinting.org and look up the printer by vendor, via the printer database. But that failed, too. So I next tried the the LinuxPrinting Canon vendor FAQ. That still didn't help! So my next step was to Google the printer model and Linux. I searched on the keywords Canon iP3000 Linux. By doing this, I got to the blog and other online posts referred to below.

id
unit-1659132512259
type
Sponsored post

I found that blog postings at various Linux sites contain many useful--and some useless--ideas. You might try the LinuxPrinting.org vendor-specific Web forum or mailing lists. In general, however, external Web search via Google works better than trying to navigate within the LinuxPrinting.org site.

In the case of the Canon iP3000, the first recommendation I saw said to use the BJC-7004 driver. While this driver works, it provides print quality of only 300 to 600 dpi (600x1200 is not usable), and the only choices in paper types are plain, bond and transparency film. Also, while the driver looks fine printing both the CUPS test image and sample text, its output on photo images is gray and muddy, even compared with what my old Lexmark printed on plain paper. Shown below is an A-B comparison of the BJC driver vs. the Canon-Japan driver discussed below. Since I print photos, I clearly needed a better driver.

Sorting Printer Wheat From Printer Chaff

Next, I decided to look for pointers to sites with installable drivers. This means file extensions like .rpm (.deb if you use a Debian-derived distro) for driver installers. (You don't want the bare .ppd or .ppd.gz files unless your printer has an internal Postscript interpreter, which very few consumer-price printers have.)

I found a posting that gave a long list of functions my printer won't support if one installs the driver the poster suggests. I bookmarked it and kept going. I knew I might not find anything better. But I kept going anyway, knowing that perseverance can pay off. And for me, it did.

I eventually found a reference on a LinuxPrinting.org mailing list via Google. I followed the links back to the German original posting. Since I don't read German, my next task was to obtain an English translation, which I got here. Like most machine translations, it was good enough, but not great.

The post turned out to be a how-to for a Debian distribution. As a result, much of the original instructions--for example, "convert RPM to DEB , add library symlinks, and remove a module"--are simply irrelevant to Fedora Core users and most others who use .rpms for installation. If you are using a Debian-based distribution, go to the German translation above, and good luck. But if you're using a Fedora-Red Hat or other RPM-based distro, you'll need to know more.

First, as I discovered, you will need to install the driver RPMs (RPM Package Managers). To download and install the RPMs for my Canon printer, I went to ftp://download.canon.jp/pub/driver/bj/linux/. The following files are the Canon Japan driver for the Canon iP4000 printer:

bjfilter-common-2.50-2.i386.rpm bjfilter-pixusip4100-lprng-2.50-2.i386.rpm bjfilter-pixusip4100-2.50-2.i386.rpm

If you have a Canon iP4000, download these. For a Canon iP3000, download the pixusip3100 RPMs for the last two; the first one is common to all supported PIXMA printers. Then login as root. To install the rpms:

rpm --install bjfilter-common-2.50-2.i386.rpm rpm --install bjfilter-pixusip4100-lprng-2.50-2.i386.rpm rpm --install bjfilter-pixusip4100-2.50-2.i386.rpm

You needn't bother with the documentation files unless you read Japanese! Patching a PPD

To get full functionality, I discovered, you must patch the PPD (Postscript Printer Definition) file to add support for quality levels and different levels of resolution. Even without adding this patch, you can still install the driver via CUPS, and you'll get extended paper-type choices and better quality photo images than what you'll get from the BJC-7004 built into your Linux distro.

There are different kinds of patches for Linux. Some patches install themselves automatically, either as rpm or deb files, or do so by automated installation via yum or apt-get. But for this patch, you'll be entering by hand, copying-and-pasting text into a configuration file. (If you don't want to edit a file by hand, skip ahead to the Installing the driver in CUPS section below, and go on from there.) My advice: Enter the patch a line at a time, being careful to extend the highlighted part to cover only the text you're patching in. I've found that invisible characters can get added to the article-editing process or in blog postings of patches. In general, the program reading the configuration files won't like them. Then enter this:

cd /usr/share/cups/model/ cp canonpixusip3100.ppd canonpixusip3100.ppd1

This gives you a copy of the of the .ppd you're about to patch. You can to fall back on this in case something doesn't work. Next:

nano canonpixusip3100.ppd

Start with changing the ID string on top of the file just below the GNU General Public License (GPL). You'll want some way to distinguish between your patched file and the original that will show up from within the CUPS selection wizard as you see above. Do it like so:

: *NickName: "Canon PIXUS iP3100 Ver.2.50

Change to:

*NickName: "Canon PIXUS iP3100 Ver.2.50x

Next, do a "Where Is" using control-W in the bottom menu to locate the following line in the printer definition file; simply type or copy/paste it into the open line at the bottom of the screen after the word Search: you will see after you hit control-W/:

*CloseUI: *InputSlot

Delete the following lines (go to the top line and hit control-K to delete a line at a time):

*OpenUI *Resolution/Output Resolution: PickOne *DefaultResolution: 600 *Resolution 600/600 dpi: "<>setpagedevice" *CloseUI: *Resolution

Then replace them with these new lines:

*OpenUI *Resolution/Output Resolution: PickOne *DefaultResolution: 600 *Resolution 600/600 dpi: "<>setpagedevice" *Resolution 1200/1200 dpi: "<>setpagedevice" *Resolution 2400/2400 dpi: "<>setpagedevice" *CloseUI: *Resolution

*OpenUI *CNQuality/Quality: PickOne *DefaultCNQuality: 3 *CNQuality 2/High: "2" *CNQuality 3/Normal: "3" *CNQuality 4/Standard: "4" *CNQuality 5/Economy: "5" *CloseUI: *CNQuality

Installing the Driver in CUPS

Next, you will install the printer driver in CUPS. Here are the steps:

If this doesn't work, and the original unmodified PIXUSIP3100 print driver does work, something probably went wrong with the copy-and-paste. As I mentioned earlier, I have found that an extra invisible character often gets added in the course of editing the article and posting it to the Web. Or, in the case of blog postings (where I got this), the blog software adds characters.

To determine whether this is the case, try deleting the above and copy/paste a line at a time. If that doesn't work, then paste into a GUI text editor like Start Menu > Accessories > More Accessories > Simple Text Editor. If you see something that isn't either an alphanumeric character or a line feed, it doesn't belong. But if you can&'t find anything and it still doesn&'t work, finish the install and try rebooting.

On my system, once everything was working, the Canon printer monitor gave me a printer status readout, including ink levels in each of the four ink tanks while a print job was underway, as shown below:

Adding Desktop Icons

To set up the desktop icon, right-click on the desktop > Create New > File > Link to Application. Using the default generic icon, click the Application tab. Then, fill in the Command textbox with bjcupsmon, and fill in Description with Canon Print Monitor.

Do the same for the Canon Print Driver utility. The command is: bjcups pixusip3100. Change pixusip3100 to match your printer label as given in the entry for your printer in the CUPS list of drivers for your printer's manufacturer. The print driver utility gives you access to print quality, page setup and maintenance functions like print-head cleaning and alignment. Printing Problems from GIMP

GIMP, or the GNU Image Manipulation Program, is freely distributed software designed for image-related tasks such as photo retouching, image composition, and image authoring. If GIMP won't print, change the print instruction in: &#91;right-click open document&#93; > File > Print > Setup printer

lp -d printername
locate *.ppd
cups

Help!

If you can't find a good print driver for a specific printer anywhere by using the above instructions, or you simply don&'t feel like putting in the time, check out a print-driver utility called TurboPrint For Linux. It costs about $30, covers a very wide range of printers (including HP, Brother, Canon and Epson), works well, and often enables all the functionality that the vendor built into a printer. In my case, for example, TurboPrint helped me gain the ability to do duplex printing.

To try it out, download the TurboPrint limited-function demo and install it. It&'s available as both an RPM and a tarball. I recommend experimenting with the trial version first, since if TurboPrint doesn't work for you, there isn't much point in paying for it.

Here's a screen shot of TurboPrint's printer configuration page:

By the way, if you get a "Media Tray Empty" error message when trying to print the test page, hit the Output button (see the illustration above).

One missing function in TurboPrint is "Check Ink Quantity." So if you do get TurboPrint, you should leave the iP3000 (or other model) printer entry in the CUPS printer selection screen, and leave your Canon Printer Monitor (or other vendor) software in place. Then the easiest way to check the ink quantity is to switch to the regular print driver, open the monitor, and see what it shows.

TurboPrint vs the IP3000 Canon Japan driver? I doubt if you'll notice a difference between the two for printing text or line art. But for photo images, it's a matter of preference. While the IP3000 driver gives bolder colors, the TurboPrint driver gives what I think is a flatter, more natural rendering of flesh tones. Judge for yourself: In the shots below, the IP3000 Canon Japan driver output is on the left, and Turboprint is on the right.

Also, you can switch back and forth between different print drivers for the same printer. But be careful: The print server will get flaky if you do too much of this. A reboot is probably the simplest solution. The alternative is login as root, kill

cupsd

and all printer-specific processes, restart

cupsd

, and finally restart the printer.

Good luck with your Linux printing! If you have any questions or comments, join me on TechBuilder.org's Recipe forum.

A. LIZARD is an Internet consultant in the San Francisco Bay Area. He has been writing for technology magazines and Web sites since 1987.