|
[ Back to Contents ]
The History of Printing in UNIX
In the beginning of human history, knowledge was passed from
person to person and generation to generation through direct,
spoken communication. Over the millennia this knowledge transfer
has changed from drawings on walls of caves, stone tablets,
scrolls, and finally flat, printed, paper. Improvements in
communication have driven technological and social change.
Throughout the history of computing, printed communication has
played a major role in the development and improvements in
computers and peripherals. It is not surprising, then, that in
the early days of UNIX the first killer app was a word processor.
With word processing, lawyers, academics, journalists, and
scientists were able to better communicate. The line printer
daemon ("LPD") was developed to spool and send the print files to
the printer. Originally developed for communication with text
printers, LPD can send any kind of file to a printer. Later
incarnations of UNIX added a new line printer system ("LP"),
which was incompatible with the old LPD but supported options for
print jobs and filtering of the job files. However, very little
has changed for UNIX printing over the 30 years since UNIX was
first created -- applications produce output suitable for the
printer, and the spooler sends this file to the printer.
Printing from Personal Computers
When the IBM Personal Computer appeared in 1981, it duplicated
the UNIX printing model. Applications came with a certain
knowledge of the escape codes and capabilities of popular
printers, and users could tell those applications which codes to
use for their particular printer. If you wanted to print files
in the background, a "print" command was available that would
spool jobs to a disk and print them while you worked on something
else.
As printers began to support graphics, applications had to
support numerous different command sets and capabilities, as well
as mixed text and graphics. The complexity of the software used to
communicate with printers soon began to rival the applications
themselves, and it wasn't long before these "printer drivers"
were an industry of their own. Unfortunately, a printer driver
for one application rarely worked with another.
Apple's release of the Macintosh computer changed how printing
was done on the personal computer. Designed from the beginning to
be a desktop publishing system, the Macintosh abstracted the
printing interface away from the application. Applications only
had to tell the printing system where and what to print, and the
printing system would translate that request into the desired
output on the selected printer. Printer drivers were provided
with MacOS or with the printer you purchased for your computer.
The same driver supported all MacOS applications, and for a short
time the Macintosh ruled the desktop publishing market.
Microsoft's first Windows operating environment duplicated
this paradigm, and to this day printing and displaying
information is handled almost identically in Windows and MacOS.
Applications for these operating systems and others like NeXT and
BeOS are able to produce professional-quality output with a
generic printing interface, yet until recently UNIX has only had
its print file spooling system.
The Evolution of CUPS
In 1993 a new company called Easy Software Products was
formed. As one of its founders, my job was to develop a modeling
program to build 3D images of aircraft, tanks, ships, and so
forth. While developing this program I ran into a problem--how
would we support printing of these models?
Applications in UNIX almost universally produce Adobe
PostScript files for printing. PostScript is a computer language
that describes pages mathmatically and is the language of choice
for most high-end printers and imagesetters. PostScript is even
used for display and was used by the NeWS window environment
under the IRIX, NeXT, and Solaris operating systems.
However, PostScript is not generally supported by
consumer-level printers and we certainly didn't have a
PostScript printer in our office. At the time, Ghostscript (a
popular free PostScript interpreter) was not an option, so we had
to write our own printer drivers just as thousands of other
companies have done before us.
I had written printer drivers before for the Radio Shack Color
Computer and later the ill-fated MM/1 computer under the OS-9
operating system, so I took the code from those old programs and
created and released to the public a program called topcl.
Topcl took an RGB image file and converted it to HP Page Control
Language (PCL) for a variety of HP and compatible printers. This
combined with the tops program supplied with the IRIX operating
system were enough to provide the printing support needed for our
modeler.
Then one day a friend of mine visited our one-room office and
I showed him our modeling program. During my demo he asked
why we were trying to sell yet another 3D modeling program
for IRIX, and why we didn't try selling the printer drivers.
"After all," he said, "you had to develop drivers, don't
you think other people need them, too?"
Not too long after this discussion, Silicon Graphics released
a new printing product called Impressario. Impressario did many
good things. It introduced the concept of filtering print files
to convert them to a printable format. It included a PostScript
interpreter to convert PostScript files to a raster format for
non-PostScript printers, and it provided a common driver
interface that could be used to develop printer drivers for
almost any kind of printer. For all these good things,
Impressario lacked printer drivers.
We released the first version of ESP Print in 1994, and by
1995 we stopped development of our modeling program to work
exclusively on ESP Print. New releases of ESP Print included a
modified version of Ghostscript that acted as a drop-in
replacement for the Impressario PostScript interpreter, and we
continued to add printer drivers as new printers became
available. ESP Print was eventually ported to Solaris and HP-UX,
and each operating system added a new wrinkle to an already
complex software package.
In 1997 we started looking at supporting the Digital UNIX and
Linux operating systems. Unfortunately, these operating systems
used the original LPD for printing so you couldn't pass options
to the printer drivers. This alone would cripple any drivers we
might develop. To make matters more complicated, at least three
versions of LPD were in common use, and they were not 100%
compatible with each other. We knew then that we had to take the
next step and replace both LPD and LP.
The original design of the Common UNIX Printing System (CUPS)
was based around the LPD network protocol (see Figure IN.1). We
added support for options and remote administration, and were
just finishing the design of the new system when the Internet
Printing Protocol (IPP) working group was created. The IPP working
group originally was just going to update the LPD network
protocol, but quickly changed its direction to create a much more
functional and extensible protocol that could evolve as needed to
support new technologies.
The switch to IPP probably delayed the release of CUPS by
about 18 months, but I think everyone is happier for it. By
supporting IPP, CUPS can accept and send print jobs almost
anywhere. CUPS also provides the infrastructure needed to support
modern printing and printers, something that printer
manufacturers need to support their printers under UNIX.
 FIGURE IN.1
The first design notes for CUPS.
Today CUPS is included with almost every major Linux
distribution and is available freely for all UNIX operating
systems. Printer drivers for CUPS are available commercially (ESP
Print Pro) as well as from several free software projects, with
quality often rivaling those under Windows and MacOS. Graphical
printing interfaces for endusers and toolkits are also available
in great numbers.
Finally, printer manufacturers now provide CUPS printer
drivers for Linux, so printing under UNIX is no longer a thing of
the past.
About This Book
This book covers every facet of the Common UNIX Printing
System. There are four sections to the book covering the use of
CUPS, the Internet Printing Protocol, programming for CUPS, and
reference information on commands, functions, and configuration
files.
If you've never used or heard of CUPS before, Chapter 1
"Introduction to CUPS," is the place to start. Here you'll learn
how CUPS interacts with you, your printers, and your
applications.
If you want to jump in and start using CUPS, use the CD-ROM at
the back of this book to get you started. We've included as many
of the popular CUPS-based printer drivers and interfaces as we
could find!
Welcome to the future of printing under UNIX!
[ Back to Contents ]
|