]> git.ipfire.org Git - thirdparty/cups.git/blame - doc/overview.html
Copyright update.
[thirdparty/cups.git] / doc / overview.html
CommitLineData
c8475f2d 1<HTML>
2<HEAD>
3 <META NAME="Author" CONTENT="Michael Sweet">
4 <TITLE>An Overview of the Common UNIX Printing System</TITLE>
8db62627 5 <LINK REL=STYLESHEET TYPE="text/css" HREF="cupsdoc.css">
c8475f2d 6</HEAD>
9cfa8573 7<BODY>
c8475f2d 8<TABLE WIDTH="100%">
9<TR VALIGN=TOP>
8db62627 10 <TD><IMG SRC="images/cups-large.gif" WIDTH="103" HEIGHT="120"></TD>
4ccfab33 11 <TD><H1 ALIGN="RIGHT">An Overview of the<BR>
12 Common UNIX Printing System,<BR>
9cfa8573 13 Version 1.2</H1>
c8475f2d 14
9cfa8573 15 <P ALIGN="RIGHT">August 14, 2002<BR>
c8475f2d 16 Michael Sweet, Easy Software Products<BR>
1d9595ab 17 Copyright 1998-2003, All Rights Reserved.</P>
c8475f2d 18 </TD>
19</TR>
20</TABLE>
c8475f2d 21
22<P>This whitepaper describes the Common UNIX Printing
23System<SUP>TM</SUP> ("CUPS<SUP>TM</SUP>"), a portable and extensible
24printing system for UNIX<SUP>&reg;</SUP>. CUPS is being developed by
4ccfab33 25<A HREF="http://www.easysw.com">Easy Software Products</A>, a software
26firm located in Hollywood, Maryland that has been selling commercial
27software for UNIX since 1993 through more than 40 distributors serving
28over 80 countries worldwide.
c8475f2d 29
30<P>Additional information on CUPS is available on the World Wide Web at
31"<A HREF="http://www.cups.org">http://www.cups.org</A>".
32
33<H2>Background</H2>
34
4ccfab33 35<P>Printing within UNIX has historically been done using one of two
8db62627 36printing systems - the Berkeley Line Printer Daemon ("LPD") [RFC1179]
4ccfab33 37and the AT&amp;T Line Printer system. These printing systems were
83030be5 38designed in the 70's for printing text to line printers; vendors have
4ccfab33 39since added varying levels of support for other types of printers.
40
41<P>Replacements for these printing systems have emerged [LPRng,
42Palladin, PLP], however none of the replacements change the fundamental
43capabilities of these systems.
8db62627 44
45<P>Over the last few years several attempts at developing a standard
46printing interface have been made, including the draft POSIX Printing
551d3a88 47standard developed by the Institute of Electrical and Electronics
48Engineers, Inc. ("IEEE") [IEEE-1387.4] and Internet Printing Protocol
49("IPP") developed by the Internet Engineering Task Force ("IETF")
50through the Printer Working Group ("PWG") [IETF-IPP]. The POSIX
51printing standard defines a common set of command-line tools as well as
52a C interface for printer administration and print jobs, but has been
53shelved by the IEEE.
4ccfab33 54
55<P>The Internet Printing Protocol defines extensions to the HyperText
56Transport Protocol 1.1 [RFC2616] to provide support for remote printing
551d3a88 57services. IPP/1.0 was accepted by the IETF as an experimental Request
58For Comments [RFC] document in October of 1999. Since then the Printer
59Working Group has developed an updated set of specifications for
60IPP/1.1 which have been accepted by the IETF and are awaiting
61publication as proposed standards. Unlike POSIX Printing, IPP enjoys
62widespread industry support and is poised to become the standard
63network printing solution for all operating systems.
4ccfab33 64
65<P>CUPS uses IPP/1.1 to provide a complete, modern printing system for
66UNIX that can be extended to support new printers, devices, and
67protocols while providing compatibility with existing UNIX
83030be5 68applications. CUPS is free software provided under the terms of the
69GNU General Public License and GNU Library General Public License.
4ccfab33 70
71<H2>History</H2>
72
73<P>The first production release of CUPS (based on IPP/1.0) was released
74in October of 1999. Since then, we have released several patch updates
75to the original CUPS 1.0 release that addressed security, portability,
83030be5 76and bugs found, but no new functionality was added to improve the
77stability of the CUPS code.
4ccfab33 78
9cfa8573 79<P>CUPS 1.2 is based on IPP/1.1 and adds many of the functional
80enhancements that have been requested by our users. As with 1.1, CUPS
811.2 will be followed by patch releases that address any problems found
82with the software but add no new major features.
c8475f2d 83
84<H2>Design Overview</H2>
85
4ccfab33 86<P>Like most printing systems, CUPS is designed around a central print
8db62627 87scheduling process that dispatches print jobs, processes administrative
88commands, provides printer status information to local and remote
89programs, and informs users as needed. Figure 1 shows the basic
90organization of CUPS.
c8475f2d 91
551d3a88 92<CENTER><IMG SRC="images/cups-block-diagram.gif" WIDTH="470" HEIGHT="170"></CENTER>
93<P ALIGN="CENTER">Figure 1 - CUPS Block Diagram</P>
c8475f2d 94
95<H3>Scheduler</H3>
96
4ccfab33 97<P>The scheduler is a HTTP/1.1 server application that handles HTTP
354eebf3 98requests. Besides handling printer requests via IPP POST requests, the
4ccfab33 99scheduler also acts as a full-featured web server for documentation,
100status monitoring, and administration.
c8475f2d 101
4ccfab33 102<P>The scheduler also manages a list of available printers on the LAN
354eebf3 103and dispatches print jobs as needed using the appropriate filters and
104backends.
c8475f2d 105
354eebf3 106<H3>Configuration Files</H3>
c8475f2d 107
354eebf3 108The configuration files consist of:
c8475f2d 109
354eebf3 110<UL>
c8475f2d 111
83030be5 112 <LI>The HTTP server configuration file.
8db62627 113
354eebf3 114 <LI>Printer and class definition files.
8db62627 115
354eebf3 116 <LI>MIME type and conversion rule files.
c8475f2d 117
4ccfab33 118 <LI>PostScript Printer Description ("PPD") files.
8db62627 119
354eebf3 120</UL>
c8475f2d 121
4ccfab33 122<P>The HTTP server configuration file is purposely similar to the
8db62627 123Apache server configuration file and defines all of the access control
124properties for the server.
c8475f2d 125
8db62627 126<P>The printer and class definition files list the available printer
78021ed9 127queues and classes. Printer classes are collections of printers. Jobs
128sent to a class are forwarded to the first available printer in the
129class, round-robin fashion.
c8475f2d 130
354eebf3 131<P>The MIME type files list the supported MIME types (text/plain,
132application/postscript, etc.) and "magic" rules for automatically
133detecting the format of a file. These are used by the HTTP server to
134determine the <I>Content-Type</I> field for <I>GET</I> and <I>HEAD</I>
4ccfab33 135requests and by the IPP request handler to determine the file type
136when a <I>Print-Job</I> or <I>Send-File</I> request is received with a
354eebf3 137<I>document-format</I> of <I>application/octet-stream</I>.
c8475f2d 138
4ccfab33 139<P>The MIME conversion rule files list the available filters. The
140filters are used when a job is dispatched so that an application can
141send a convenient file format to the printing system which then
142converts the document into a printable format as needed. Each filter
143has a relative cost associated with it, and the filtering algorithm
144chooses the set of filters that will convert the file to the needed
145format with the lowest total "cost".
c8475f2d 146
4ccfab33 147<P>The PPD files describe the capabilities of all printers, not just
148PostScript printers. There is one PPD file for each printer. PPD files
149for non-PostScript printers define additional filters through
150<I>cupsFilter</I> attributes to support printer drivers.
8db62627 151
4ccfab33 152<H3>CUPS API</H3>
c8475f2d 153
4ccfab33 154<P>The CUPS API contains CUPS-specific convenience functions for queuing
155print jobs, getting printer information, accessing resources via HTTP
156and IPP, and manipulating PPD files. Unlike the rest of CUPS, the CUPS
157API is provided under the terms of the GNU LGPL so it may be used by
158non-GPL applications.
159
160<H3>Berkeley and System V Commands</H3>
161
162<P>CUPS provides the System V and Berkeley command-line interfaces for
163submitting jobs and checking the printer status. The
164<CODE>lpstat</CODE> and <CODE>lpc status</CODE> commands also show
83030be5 165network printers ("printer@server") when printer browsing is enabled.
4ccfab33 166
167<P>The System V administation commands are supplied for managing
83030be5 168printers and classes. The Berkeley printer administration tool
4ccfab33 169(<CODE>lpc</CODE>) is only supported in a "read-only" mode to check the
170current status of the printer queues and scheduler.
c8475f2d 171
172<H3>Filters</H3>
173
4ccfab33 174<P>A filter program reads from the standard input or from a file if a
c8475f2d 175filename is supplied. All filters must support a common set of options
176including printer name, job ID, username, job title, number of copies,
177and job options. All output is sent to the standard output.
178
4ccfab33 179<P>Filters are provided for many file formats and include image file
83030be5 180and PostScript raster filters that support non-PostScript printers. Multiple
181filters are run in parallel to produce the required output format.
182
183<P>The PostScript raster filter is based on the GNU Ghostscript 5.50
184core. Instead of using the Ghostscript printer drivers and front-end,
185the CUPS filter uses a generic raster printer driver and CUPS-compliant
186front-end to support any kind of raster printer. This allows the same
187printer driver filter to be used for printing raster data from any
188filter.
4ccfab33 189
190<H3>CUPS Imaging</H3>
191
192<P>The CUPS Imaging library provides functions for managing large
193images, doing colorspace conversion and color management, scaling
194images for printing, and managing raster page streams. It is used by
195the CUPS image file filters, the PostScript RIP, and all raster
196printers drivers.
197
354eebf3 198<H3>Backends</H3>
c8475f2d 199
4ccfab33 200<P>A backend program is a special filter that sends print data to a
201device or network connection. Backends for parallel, serial, USB, LPD, IPP,
9cfa8573 202and AppSocket (JetDirect) connections are provided in CUPS 1.2.
c8475f2d 203
4ccfab33 204<P>SAMBA version 2.0.6 and higher includes a SMB backend
205(<CODE>smbspool(1)</CODE>) that can be used with CUPS 1.0 or 1.1 for
206printing to Windows.
c8475f2d 207
4ccfab33 208<H2>Network Printing</H2>
c8475f2d 209
4ccfab33 210<P>Traditionally, network printing has been one of the hardest things to
211get working under UNIX. One reason is because each vendor added their
212own extensions to the LPD protocol (the previous standard for network
213printing), making cross-platform printing difficult if not impossible.
214
83030be5 215<P>Another reason is that you have to administer every network printer
216on every client machine. In some cases you can "clone" the printer
217configuration from a "master" client to each of the others, but even
218that can be time-consuming and error-prone. Something better is needed.
4ccfab33 219
220<P>CUPS provides "printer browsing", which allows clients to
221automatically see and use printers from any server on a LAN. This means
222that you only need to configure the server and the clients will
83030be5 223automatically see the printers and classes on it.
4ccfab33 224
225<P>In addition, CUPS can automatically merge multiple identical network
83030be5 226printers into "implicit classes". This allows clients to send jobs to
227the implicit class and have them print on the first available printer
228or server. In addition, failsafe and load-balancing functions are
229enabled simply by defining the same printer on multiple servers!
4ccfab33 230
9cfa8573 231<H2>New Features in CUPS 1.2</H2>
4ccfab33 232
9cfa8573 233<P>CUPS 1.2 includes many new features and capabilities:
4ccfab33 234
235<OL>
236
237 <LI><A HREF="#BACKENDS">Backends</A>
238
239 <LI><A HREF="#BANNERS">Banner Page Support</A>
240
241 <LI><A HREF="#DIGEST">Digest Authentication</A>
242
243 <LI><A HREF="#DIRSVC">Directory Services</A>
244
245 <LI><A HREF="#FHS2">Directory Structure Changes</A>
246
247 <LI><A HREF="#DOCOS">Documentation</A>
248
249 <LI><A HREF="#DRIVERS">Drivers</A>
250
251 <LI><A HREF="#FILTERS">Filters</A>
252
253 <LI><A HREF="#IPP">IPP Support</A>
254
255 <LI><A HREF="#PERSISTENCE">Job Persistence</A>
256
257 <LI><A HREF="#LPD">LPD Client Support</A>
258
259 <LI><A HREF="#USEROPTS">User-Defined Printers and Options</A>
260
261 <LI><A HREF="#WEB">Web Administration Interface</A>
262
263</OL>
264
265<H3><A NAME="BACKENDS">1. Backends</A></H3>
266
9cfa8573 267<P>CUPS 1.2 implements a new backend interface for retrieving a list of
4ccfab33 268available devices for CUPS clients. This allows administration
269interfaces to query the CUPS scheduler for a list of available devices,
270automatically configure printers if the device identification
271information is available, and present the user with a list of available
272devices rather than relying on the user to know what devices are
273configured on the system.
274
275<P>The new release also includes a backend for USB printers under
83030be5 276*BSD and Linux. Support for USB under Solaris 8 will be provided in
4ccfab33 277a subsequent patch release.
278
279<H3><A NAME="BANNERS">2. Banner Page Support</A></H3>
280
9cfa8573 281<P>CUPS 1.2 includes support for banner pages at the beginning and end
83030be5 282of a job. Banner pages may be of any file format and support variable
283substitution for job titles, usernames, etc. Default banner pages are
284associated with each printer and can be overridden with command-line
285options by the user.
4ccfab33 286
287<H3><A NAME="DIGEST">3. Digest Authentication</A></H3>
288
289<P>Digest authentication provides a more secure method of authenticating
290access to the printing system. Unlike Basic authentication, Digest
291authentication does not send passwords "in the clear" so it is more
292difficult to gain unauthorized access to your system.
293
9cfa8573 294<P>CUPS 1.2 implements Digest authentication using a special MD5
4ccfab33 295password file instead of the UNIX password file. This file is managed
296using the new <CODE>lppasswd</CODE> command.
297
298<H3><A NAME="DIRSVC">4. Directory Services</A></H3>
299
9cfa8573 300<P>CUPS 1.2 adds new directory service ("printer browsing") features to
4ccfab33 301make using CUPS on large LANs and WANs easier. You can now poll a
302remote server for printer information and relay it to the LAN as well
303as restrict what printer information is processed (e.g. to "hide"
304servers, domains, or networks that you don't want to see.)
305
306<H3><A NAME="FHS2">5. Directory Structure Changes</A></H3>
307
9cfa8573 308<P>CUPS 1.2 now uses a directory structure that complies with the
4ccfab33 309Filesystem Hierarchy Standard ("FHS"), version 2.0. This should make
310integration into existing Linux and *BSD distributions a lot easier.
311
312<H3><A NAME="DOCOS">6. Documentation</A></H3>
313
9cfa8573 314<P>The CUPS 1.2 documentation has gone through many revisions,
4ccfab33 315including a completely rewritten administrators manual, a new
316programmers manual, and an IPP implementation reference manual.
317
318<H3><A NAME="DRIVERS">7. Drivers</A></H3>
319
9cfa8573 320<P>CUPS 1.2 includes drivers for EPSON dot-matrix and inkjet printers.
4ccfab33 321As with the HP PCL drivers, the EPSON drivers don't necessarily provide
322the best possible output for each printer but should provide adequate
323printing quality for general day-to-day printing.
324
325<H3><A NAME="FILTERS">8. Filters</A></H3>
326
9cfa8573 327<P>CUPS 1.2 includes new image, PostScript, PDF, and text filters. The image
4ccfab33 328filters have been upgraded to support Windows BMP and Alias PIX files.
329
330<P>The PostScript filter is now based off GNU Ghostscript 5.50. The new
331filter provides much better performance with higher-resolution printers
332and supports most Level 3 PostScript language features.
333
334<P>The new PDF filter is based off the excellent Xpdf software from
335Derek Noonburg and supports automatic page scaling. The new filter is a
336faster, smaller, more reliable replacement for the GNU Ghostscript PDF
337filtering that was used in CUPS 1.0.
338
339<P>The new text filter now supports bidirectional text and can embed
340fonts as needed.
341
342<H3><A NAME="IPP">9. IPP Support</A></H3>
343
344<P>Probably the least visible portion of CUPS is the IPP support. CUPS
3451.1 implements all of the required IPP/1.1 operations and attributes
346and most of the optional ones. The optional Create-Job and Send-File
347operations are now implemented, allowing for better System V printing
348system compatibility (one job ID per <CODE>lp</CODE> command) and
349support for banner pages.
350
351<H3><A NAME="PERSISTENCE">10. Job Persistence</A></H3>
352
9cfa8573 353<P>CUPS 1.2 supports job persistence. This means that jobs are preserved
4ccfab33 354even after a reboot, a feature that was sorely missing from CUPS 1.0.
355
9cfa8573 356<P>In addition, CUPS 1.2 allows you to keep job information after the
4ccfab33 357job has printed. The basic post-job persistence mode provides a job
358history (number of pages printed, time job was printed, etc.) but does
359not preserve the actual job files. This can be changed to discard all
360information after a job is printed or keep the job files after printing
361so you can reprint a job at some later time.
362
363<H3><A NAME="LPD">11. LPD Client Support</A></H3>
364
9cfa8573 365<P>By popular request, CUPS 1.2 supports LPD-based clients using a new
4ccfab33 366mini-daemon that handles LPD requests and passes them on to the main
367server.
368
369<H3><A NAME="USEROPTS">12. User-Defined Printers and Options</A></H3>
370
9cfa8573 371<P>CUPS 1.2 includes support for user-defined printers and options via
4ccfab33 372a new <CODE>lpoptions</CODE> command. User-defined printers are special
373instances of the available printers (e.g. "printer/instance" or
374"printer@server/instance") that can have their own default options such
375as media size, resolution, and so forth. The <CODE>lpoptions</CODE>
376command can also be used to set a different default printer queue.
377
378<H3><A NAME="WEB">13. Web Administration Interface</A></H3>
379
380<P>CUPS 1.0 provided a simple class, job, and printer monitoring
9cfa8573 381interface for web browsers. CUPS 1.2 replaces this interface with an
4ccfab33 382enhanced administration interface that allows you to add, modify,
383delete, configure, and control classes, jobs, and printers.
384
385<H2>Software Using CUPS</H2>
386
387<P>A lot has happened since CUPS 1.0 came out, and many software packages
388are supporting CUPS. We have contributed code to the SAMBA team to support
389CUPS, and parts of that are already available in SAMBA 2.0.6 and 2.0.7.
390With any luck the final pieces that provide a complete integration with
391SAMBA will be available in the next release of SAMBA.
392
393<P>Two graphical interfaces have appeared on the scene that use CUPS as
394well. The KUPS project provides a KDE-based interface for CUPS and can be
395found at:
396
397<UL><PRE>
398<A HREF="http://kups.sourceforge.net">http://kups.sourceforge.net</A>
399</PRE></UL>
400
401<P>The X Printing Panel ("XPP") project provides a graphical printing
402panel for CUPS and can be found at:
403
404<UL><PRE>
405<A HREF="http://www.phy.uni-bayreuth.de/till/xpp">http://www.phy.uni-bayreuth.de/till/xpp/</A>
406</PRE></UL>
407
408<P>Numerous other filters, drivers, tutorials, etc. have been made available
9cfa8573 409on the CUPS Links web page, available at:
4ccfab33 410
411<UL><PRE>
9cfa8573 412<A HREF="http://www.cups.org/links.php">http://www.cups.org/links.php</A>
4ccfab33 413</PRE></UL>
414
415<P>Finally, our own ESP Print Pro software uses CUPS to provide drivers
8b7d6156 416for thousands of printers and can be found at:
4ccfab33 417
418<UL><PRE>
419<A HREF="http://www.easysw.com/printpro">http://www.easysw.com/printpro</A>
420</PRE></UL>
421
422<H2>Operating Systems Using CUPS</H2>
423
424<P>One of our goals has always been to get as many UNIX/Linux
425distributions using CUPS as possible. Debian is currently providing
426CUPS as part of its stable distribution, and many other distributions
427are considering it in their next releases.
c8475f2d 428
c8475f2d 429<H2>Summary</H2>
430
4ccfab33 431<P>The Common UNIX Printing System provides a modern printing interface
c8475f2d 432for UNIX applications that is both flexible and user-friendly. The
433software provides System V and Berkeley compatible command-line
9cfa8573 434interfaces to ensure compatibility with existing applications. CUPS 1.2
4ccfab33 435adds many new features that make it an even better choice for printing
436under UNIX.
c8475f2d 437
4ccfab33 438<H2>Who to Contact</H2>
c8475f2d 439
4ccfab33 440<P>For more information on CUPS please contact us at:
c8475f2d 441
4ccfab33 442<UL><PRE>
443Attn: CUPS Information
444Easy Software Products
44544141 Airport View Drive Suite 204
354eebf3 446Hollywood, Maryland 20636-3111 USA
4ccfab33 447
448+1.301.373.9600
449
450<A HREF="mailto:cups-info@cups.org">cups-info@cups.org</A>
451</PRE></UL>
c8475f2d 452
453<H2>References</H2>
454
8db62627 455<DL>
456
457 <DT>IEEE-1387.4</DT>
458
459 <DD>System Administration - Part 4: Printing Interfaces (draft)</DD>
c8475f2d 460
8db62627 461 <DT><A HREF="http://www.pwg.org/ipp/index.html">IETF-IPP</A></DT>
c8475f2d 462
4ccfab33 463 <DD>Internet Printing Protocol/1.1</DD>
c8475f2d 464
8db62627 465 <DT><A HREF="http://www.astart.com/lprng.html">LPRng</A></DT>
c8475f2d 466
4ccfab33 467 <DD>An enhanced, extended, and portable implementation of the
468 Berkeley LPR print spooler functionality</DD>
c8475f2d 469
8db62627 470 <DT>Palladin</DT>
c8475f2d 471
4ccfab33 472 <DD>A printing system developed at the Massachussetts Institute
473 of Technology</DD>
c8475f2d 474
8db62627 475 <DT><A HREF="http://www-usa.iona.com//hyplan/jmason/plp.html">PLP</A></DT>
c8475f2d 476
8db62627 477 <DD>The Portable Line Printer spooler system</DD>
c8475f2d 478
4ccfab33 479 <DT><A HREF="http://www.ietf.org/rfc/rfc1179.txt">RFC1179</A></DT>
c8475f2d 480
8db62627 481 <DD>Line Printer Daemon Protocol</DD>
c8475f2d 482
4ccfab33 483 <DT><A HREF="http://www.ietf.org/rfc/rfc2046.txt">RFC2046</A></DT>
c8475f2d 484
8db62627 485 <DD>Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types</DD>
c8475f2d 486
4ccfab33 487 <DT><A HREF="http://www.ietf.org/rfc/rfc2616.txt">RFC2616</A></DT>
c8475f2d 488
8db62627 489 <DD>Hypertext Transfer Protocol -- HTTP/1.1</DD>
c8475f2d 490
8db62627 491</DL>
c8475f2d 492
493<H2>Trademarks</H2>
494
4ccfab33 495<P>The Common UNIX Printing System, CUPS, and the CUPS logo are the
496trademark property of Easy Software Products. All other trademarks are
497the property of their respective owners.
c8475f2d 498
499</BODY>
500</HTML>