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 Amazon.com. 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

Introduction

Part 1

Part 2

Part 3

Part 4

Index

Errata

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:

http://printing.kde.org

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 install.sh and not cups.install.

Page 43

The text:

... DTE-DSR flow control would need the following device URI:
serial://dev/ttyS0?baud=19200+bits=7+parity=even+flow=dtedsr

should read:

... DTR-DSR flow control would need the following device URI:
serial:/dev/ttyS0?baud=19200+bits=7+parity=even+flow=dtrdsr

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.

Examples

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

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

examples
  |
  +-LICENSE.txt [License file referenced by sources]
  |
  +-chap13 [13 - Overview of CUPS Programming]
  |   configure.in
  |   Makefile.in
  |   config.h.in
  |   firstcups.c
  |   configure
  |
  +-chap14 [14 - Using CUPS API Functions]
  |   configure.in
  |   testppd.c
  |   print.c
  |   Makefile.in
  |   config.h.in
  |   showjobs.c
  |   configure
  |   showdests.c
  |
  +-chap15 [15 - Sending IPP Requests Using CUPS]
  |   configure.in
  |   Makefile.in
  |   config.h.in
  |   showprinters.c
  |   configure
  |   browse.c
  |
  +-chap17 [17 - Writing Printer Drivers for CUPS]
      configure.in
      rastertohp.c
      Makefile.in
      textcommon.c
      texttohp.c
      config.h.in
      common.h
      deskjet.ppd
      configure
      laserjet.ppd
      textcommon.h
      common.c