Printing Trends in Linux

What technology has to work right out of the box, but requires cooperation among a dozen companies and even more independent developers? If you answered printing, you probably remember the tussles you've had with this technology on Linux or Unix systems.

The paperless society that the analysts talked about in the 1980s failed to come about. On Linux, in fact, many new users who eagerly load up the operating system so many people have raved about quickly discover that they're going to have to put in a lot of hours tweaking their new toy, and the first thing they want to do is print the documentation. Thus they discover early on one of the unappealing weaknesses of Linux that the Open Printing Working Group would like to remedy.

This printer use case, and other insights, came from an interesting talk I recently had with Ira McDonald. He became the chair of the OPWG in November 2006, about the same time the former project of the Free Standards Group came under the umbrella of the new Linux Foundation. The move brought many financial benefits&8212;including the first full-time paid position, for which a long-time volunteer was hired as administrator&8212;but also some constraints caused by working within a larger organization with multiple goals. The OPWG also works closely with the Printer Working Group, a program of the IEEE Industry Standard and Technology Organization (ISTO).

On a remarkably thin shoestring budget and entirely volunteer contributions, the OPWG has made substantial progress toward producing rich, open standards and open source implementations of those standards for Linux and Unix. Its participants are scattered around the world, with major subprojects hosted in the United States, Europe, and East Asia. The OPWG is enthusiastically backed by printer vendors, who want to provide printing support for Linux and realize they can't afford to put in the same effort dealing with each distribution that they put into dealing with Microsoft or Apple. About half of OPWG's volunteers work for printer vendors or ISVs.

I divide the projects that Ira told me about into three types: short-term, long-term, and impossible. What I call impossible is not really unrealizable in a mathematical sense, of course, but seems at this point to require a substantial compromise with the goals and philosophies of Linux and Unix supporters, no matter what direction is taken.

Short-Term

Within a year, hopefully, the OPWG will achieve the following.

Distribution-Independent Printer Drivers

Up to now, each printer required a different driver on each Linux distribution, because of silly differences in file locations and other trivia. The Linux Standard Base, which specifies baseline functionality for so many subsystems in Linux, did not cover printing until the current version, 3.2. As 3.2 gets released (it is planned for this coming September) and adopted by distributions over the following few months, they will all be able to offer a single binary for each printer.

PDF Support in CUPS

Linux printing in desktop environments depends on Ghostscript, a PostScript interpreter, even though many printers are comfortable nowadays with the PDF format and many users print documents that come in completely unrelated formats, such as JPEG photos. The Ghostscript rendering step is required by the Common UNIX Printing System (CUPS) that is the default print spooler in all major Linux distributions.

Ghostscript offers good features on Linux these days, thanks to a historic decision made by the inventors of Ghostscript, Artifex Software Inc., about a year ago. Artifex offered Ghostscript for over a decade to the free software community, but insisted on keeping the free-as-in-freedom version a year behind their commercial release. It is a tribute to their willingness to take risks&8212;and to the mainstreaming of the free software movement&8212;that they decided to merge their commercial version with the free one. One immediate benefit is that the separate bug databases for the two versions were combined and all fixes were shared. Now things are easier for Artifex, which has to maintain just one version of the software, and all the newest features become available to Linux users right away

Still, PDF should be supported as the primary intermediate print file format. CUPS is being upgraded to support PDF even better in the future, through new filters that are part of the OPWG (Open Printing Vector Printer) Driver API standard now being developed in Japan.

Job Tickets for Rich User Specifications

Even relatively low-cost printers can nowadays support very rich features such as two-up and four-up printing (that is, shrinking pages and putting multiple pages on one sheet), stapling, covers, and so on. Client-side print software in the proprietary world lets a user store the desired features so they don't have to be specified over and over on each print request. The OPWG completed a standard along these lines in 2005 called the Job Ticketing API or JTAPI (the same acronym happens to be used for an old telephony specification, but this is different). It allows the creation and editing of job tickets (this term comes from paper job tickets still widely used in print shops and the production printing industry) in a variety of formats, such as CIP4 JDF. OPWG hopes soon to develop the first open source implementation of the JTAPI.

Long-Term

The following achievements lie within sight, but are more than six months out.

Printing from Embedded Systems

Many people would like to print a web page from their PDA, or a picture from their camera, directly to a printer that's connected through a USB cable or Bluetooth connection. The software stack has to be minimal in order to fit on a small device and work without processor support for memory-management. And luckily, the requirements are simple enough to make a small stack possible. No spooler like CUPS is needed because the connection is a direct one and there's only one choice of printer. Thus, both CUPS and Ghostscript (which is too large for embedded systems by a couple orders of magnitude, even when compiled without the printer drivers) can be eliminated. OPWG hopes to make significant progress on a standard Embedded Printing Solution within six months to a year.

Another requirement or PDA and other small device support is software that can query the capabilities of the printer (such as stapling and two-up printing) and offer them to the user through a simple GUI. Although a new standard Capabilities API is being developed by the OPWG that will facilitate the querying part, OPWG is not working on GUIs. The series of Printing Summit conference (being held next on September 24-27 in Montreal) is fostering work by the Open Usability team to design a framework for next-generation printing GUIs.

Printer Capabilities Discovery

You may be able to see in your printer dialog that a printer offers legal-size paper, but how do you know whether the paper is actually loaded? And how can you request a search for a printer that has legal-size paper, if you don't already know which one?

Discovery of printer capabilities requires a two-way data exchange that is a good deal more complicated than current spooling, which is mostly one-way. Modern network printers support this exchange via SNMP, IPP (Internet Printing Protocol), and other protocols, and over the coming year OPWG plans to develop a standard Discovery API.

Testing and Validation

One of OPWG's newest subprojects is working on ways to allow someone to quickly test whether a printer driver is present and supports all the printer's features and whether the complete print workflow chain of software is present and installed.

Impossible

The printer feature that gets heads scratching the most is one of the most basic: secure installation of printer drivers. As I mentioned already, we will soon be able to install a single binary to support a particular printer on any Linux system. But automatic downloading of binaries inevitably opens the door to malicious code. Ira is not ready to promise that the OPWG site is safe from cracking. And users could be directed to get binaries from other sites too, where there are no guarantees. Printer drivers run in userspace, but there's still plenty of scope for spyware, distributed DoS attacks, and other fixtures of the modern Internet.

Automatic driver installation is critical to make Linux appeal to technically unsophisticated end-users, but they are the most vulnerable to attack, and unlikely to understand the value of checking an MD5 or SHA signature. These people routinely click through "Are you sure?" dialog boxes&8212;for good reason, because they're presented too often and rarely offer enough information to make an informed decision.

Operating systems and printer manufacturers could collaborate to enforce digital signatures and prevent the loading of unauthorized drivers. But that solution would enshrine the much-maligned technology of Digital Rights (or Restrictions) Management, which is philosophically rejected by most of the free software community and has a very poor success rate in the content industries. Nonetheless, law professor and Internet research Jonathan Zittrain has suggested in his paper The Generative Internet that such a move may be the only way to create a safe Internet or to ward off a more dangerous backlash toward security, and that most users would be happier with "information appliances" than with the more free-wheeling systems that researchers and developers use.

What OPWG Is Looking for

The OPWG is an anomaly in open source projects. While most such projects are started by of independently-minded geniuses who take the software in whatever direction their inspirations lead, the OPWG has shouldered the sober task of setting standards that make sense for dozens of companies and sticking to them. The eternal rounds of committee meetings, exchanges of drafts, and development of reference implementations are the mainstay of OPWG work. Everybody has to work together.

The efforts of the OPWG show how important the LSB and other seemingly dull standardizations are to the future of Linux. The OPWG has asked the LSB committee to include a version of the Linux kernel in the standard because a stable kernel is required for testing userspace applications such as printing.

Financially, OPWG is meeting its needs, although it can always benefit from support for its volunteers' travel costs. What Ira says they're looking for is more donations of time and attention from the printer vendors and other companies that benefit from their efforts. They need experts to edit standards, create reference implementations, and do code reviews.

The public gets excited over the latest boundary-pushing application, but they forget that they can access and run this application only thanks to painstaking infrastructure effort by others who receive less attention. The OPWG falls in this unsung category of people looking for little reward but an environment that will support their future work. Print this article out a year or two from now and look back at it to consider how much the printing infrastructure has improved.

Andy Oram
is an editor for O'Reilly Media, specializing in Linux and
free software books, and a member of Computer Professionals for Social
Responsibility. His web site is www.praxagora.com/andyo.