Linux Printing -- Samsung CLP-300 (and HP-IIP)

Having just spent something in excess of three days of my life getting a couple of laser printers to work in Linux, I thought that I'd document what I learned. Maybe this will help some others.

I decided five or six years ago that NT based Windows probably never will be an especially good desktop operating system. Relative to Windows 9, it's too complex, too proprietary, largely undocumented, increasingly user hostile, and way too hard to work on. It is also hopelessly insecure -- in some ways even worse than Windows 9. Neither do I think it will evolve into a really good personal computer OS, although its doing so is unlikely, not impossible.

Before one can abandon Windows, one needs an alternative.

Until recently, I felt that Linux not ready for serious use on the desktop. That's changed. Linux still has flaws, but I think that now -- in 2007 -- Linux has caught up to Windows in usability. It's better in most respects. It still lags in a few areas -- including hardware support and printing. But I'm fairly sure that the problems will be overcome.

So, I'm switching from Windows to Open Source Software -- an process that I think will take several years to fully execute.

So, I have Slackware 11.0 running. I've overcome the problems in accessing the built in wireless on my new AcerPower-1000 PC. The only problem remaining before I tackled major job of reorganizing my computer related activities to use non-Windows software (not much of what I use runs acceptably under WINE) was that neither of the household laser printers worked with Slackware.

There are a number of approaches to Unix printing. A decade ago they were virtually unusable except for simple ASCII documents and -- on good days some expensive Postscript printers. Printing has gotten better. Much better. It's still not as good as Windows. And Windows is far from perfect.

The best of a still somewhat rum lot is CUPS (Common Unix Printing System/Can't Usually Print Stuff -- take your pick). It often works. Sometimes it doesn't. When it does not work, fixing problems is very difficult.

I should point out that there are two components to CUPS although no attempt is made to make that clear to the user. Part of CUPS is a spooler/router that manages print jobs; gets them to the proper destination in a rational order; etc. The other part of CUPS is a bunch of software that converts a desired printout into a printable file that can be fed into the spooler/router. The spooler/router seems to me to be usable albeit sometimes a bit idiosyncratic. It may well be ready for prime time -- at least in home and small business installations.

My problems were with print file creation.

Samsung CLP-300N Color Laser Printer

The CLP-300 is an inexpensive color laser printer from Samsung. It comes in a vanilla -- USB connected version, and an N version with more memory and a Network port. We have the N model, but I believe that most of what I have to say would apply equally to it's non-network enabled sibling. The Samsung site seems to indicate that there might be a third -- DSL -- version. If it exists, I'd imagine that it would have the same problems.

The CLP-300(N) arrives with a CD full of software. There are both Windows drivers and Linux 'drivers'. The Windows drivers work fine with both Windows 9 and Windows XP. The Linux drivers did not appear to work with anything. I'll expand on that in a while. A second CD is provided with 'network software'. I have never looked at it. [Update Nov 2009. I have looked at it and have determined that the Windows Sync Thru tool will not install under Wine. That is largely irrelevant as the printer can be configured and checked through its http interface. Exception: Checking toner levels require SNMP and the Linux Smartpanel tool that is supposed to do that ... surprise ... doesn't work.]

HP-IIP Laser Printer

The HP-IIP is an ancient, slow, but still quite usable, printer. The HP-II and the similar HP-III printers have been around for more than a decade and are largely responsible for Hewlett-Packard's reputation for building nearly indestructible small laser printers. They actually use Canon laser engines -- HP did the electronics and packaging.

The problem with the HP-IIP under Linux is that it uses an early version of HP's PCL printer language. Generic Linux PCL filters often do not work with the HP-IIP (I'd guess that they don't work with the HP-II either). In my case, the HP-IIP worked in kubuntu, but printed only blank pages in Slackware.


There are actually three possible sets of 'drivers' (filters) for the CLP300.


CUPS works roughly like this. A Linux program wants to print. It creates a print file in some reasonable (to it) format. CUPS' goal is to get the content of that file to the printer in a format that the printer will understand. There are a very large number of printer formats. Unfortunately, the Samsung CLP300 does not understand any of the widely used formats -- ASCII, PCL, or Postscript. The CLP300 wants the page in a format variously called SPL (Sharp, or maybe Samsung, Printer Language) or QPDL. This problem of needing a special format is not limited to the Samsung printers. It's pretty common actually. CUPS deals with these issues by using a chain of programs called 'filters' that convert from program output formats -- usually ASCII or Postscript -- to printer formats.

Geeks might want to know, a QPDL/SPL page is a compressed bitmap that uses dynamic compression algorithms on vertical bands of data. It appears that there are several compression algorithms built into the language and that some may quite likely still be under development. Thus, an SPL printer may be a moving target for a driver author. Isn't that just dandy?

There is a (partial?) description of SPL/QDPL available on the splix website http://

The key to getting CUPS to work with a given product is providing CUPS with a Postscript Printer Description (PPD) file that describes what the printer needs. A filter to convert the printout from a known format to the format needed by the printer will be required if the filters distributed with CUPS won't do the job. Shorn of a zillion details (many of them important) there usually is a line buried in the PPD file that says to CUPS in effect -- 'If you can get your printout into this format that you and I both understand, here's a filter (driver) that will output a print file that the printer will love'. Typically the line will look like 'application/vnd.cups-raster 0 xyz' or 'application/vnd.cups-postscript 0 xyz'. These lines say to CUPS, you get the printout into raster (or in the second case postscript) format and xyz will take it from there.

CUPS will use the PPD to come up with a filter chain that converts the program output to the format needed by the printer. CUPS will take the output of the filter(s) and route it to the printer.

Bottom line: In order to use CUPS to print to a Samsung CLP300 printer, you need a suitable PPD file and a you need to install a filter that outputs SPL/QPDL in a place that CUPS can find it.

Hewlett-Packard IIP Laser Printer

On Slackware 11.0, the HP-IIP printed only blank pages. Tinkering with the printer parameters (e.g. greyscale printing) that might, conceivably, be responsible didn't help. So I simply went to (which, by the way, does not seem to be working properly this morning as the only HP printer that it seems to know about is the DJ693A. I imagine that it will work better within a few hours or days). I found a different 'driver' for the HP-IIP. I downloaded the ljet2p.ppd ppd then set up a new CUPS printer to use it. It worked perfectly. The only difficulty I encountered was my failure to recognize quickly that all I needed was the PPD file because the necessary filter (foomatic-rip) was already installed.

Recommendations for mere mortals using Linux printing: