Chapter 14. Printing with CUPS

Introduction

The Common Unix Printing System (CUPS) is a modern printing subsystem for Linux and Unix that replaces the hoary old Unix line-printer protocols. It runs on Unix, Linux, Mac OS, and Mac OS X, and it serves clients on nearly any platform, including Windows.

CUPS is thoroughly modern, supporting laser and inkjet printers as well as dot matrix and other legacy printers.

There are two versions of CUPS: the free GPL version, which is the default on most of the major Linux distributions, and a commercial edition. The commercial version comes with support, a larger selection of drivers, and nicer management interfaces.

Printer drivers in CUPS consist of one or more filters specific to a printer, which are packaged in PPD (PostScript Printer Description) files. All printers in CUPS—even non-PostScript printers—need a PPD. The PPDs contain descriptions about the printers, specific printer commands, and filters.

Filters are the heart and soul of CUPS. Filters translate print jobs to formats the printer can understand, such as PDF, HP-PCL, raster, and image files, and they pass in commands for things such as page selection and ordering. PPDs are text files—take a look in /usr/share/cups/model/ to see what they look like. Installed printers have PPDs in /etc/cups/ppd.

Finding Drivers

Included in CUPS are generic PPDs for 9-pin and 24-pin Epson dot matrix printers, Epson Stylus and Color Stylus Photo printers, LaserJet and HP DeskJet printers, and even ...

Get Linux Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.