CUPS: Common UNIX Printing SystemThe CUPS Book, "CUPS: Common UNIX Printing System", is the definitive guide to CUPS. Although originally written before CUPS 1.2 was released, the book is still relevant to current versions of CUPS and it an indispensible companion for any administrator or developer that uses CUPS. This page provides access to the example code in the book as well as corrections and updates since the book's publication.

The CUPS book, published by SAMS Publishing, may be purchased from Note, however, that the companion CD is not provided with the book and is no longer available from the author. The sources from the original companion CD are provided here instead.

Table of Contents


Part 1

Part 2

Part 3

Part 4



Page 10

The text:

... Additionally, IIP supports encryption ...

should read:

... Additionally, IPP supports encryption ...

Page 14

CUPS also now provides drivers for Dymo label printers using the dymo.ppd PPD file.

Page 16

KUPS has been superceded by KDE Print, available at:

Page 24

The correct command to extract the CUPS source code is:

tar xvzf /mnt/cdrom/source/cups-version-source.tar.gz ENTER

Page 25

The description for the PNG library contains part of the URL for the PNG home page.

Page 27

The correct option for specifying the font page is --with-fontpath and not --fontpath.

Page 28

The acronym SLP stands for Service Location Protocol, not Server Location Protocol.

Page 28

The --with-openslp-includes, --with-openslp-libs, --with-openssl-includes, and --with-openssl-libs configure options are not described.

Page 32

The correct script to run from the CD-ROM is and not cups.install.

Page 43

The text:

... DTE-DSR flow control would need the following device URI:

should read:

... DTR-DSR flow control would need the following device URI:

Page 57

The lpadmin example:

lpadmin -p name --o option=value ENTER

should read:

lpadmin -p name -o option=value ENTER

Page 78

The natural-scaling option is not described:

natural-scaling: Sets the size of the image in percent of the natural image size.

The natural-scaling value is a percentage from 1 to 800. The percentage is based on the natural image size and not the page size.


The examples are provided on the CUPS Companion CD-ROM in the examples directory:

Download Examples (examples.tar.gz, 81k)

  +-LICENSE.txt [License file referenced by sources]
  +-chap13 [13 - Overview of CUPS Programming]
  |   firstcups.c
  |   configure
  +-chap14 [14 - Using CUPS API Functions]
  |   testppd.c
  |   print.c
  |   showjobs.c
  |   configure
  |   showdests.c
  +-chap15 [15 - Sending IPP Requests Using CUPS]
  |   showprinters.c
  |   configure
  |   browse.c
  +-chap17 [17 - Writing Printer Drivers for CUPS]