Home Wiki > SDB:AirPrint via CUPS
Sign up | Login

SDB:AirPrint via CUPS

tagline: From openSUSE

For printers that do not support AirPrint natively the RPM package "cups-airprint" can be used to provide basic AirPrint support for basic printing tasks from iOS or OS X devices.

Introduction

AirPrint is an Apple technology that helps you create full-quality printed output from iOS or OS X devices without the need to download or install drivers.

Some printers support AirPrint natively. For AirPrint printers you do not need CUPS AirPrint support.

For any other printer, if it can be printed to via CUPS, there is the RPM package "cups-airprint" that provides the additional tools and configuration files needed to add CUPS AirPrint support for basic printing tasks from iOS or OS X devices.

For limitations see the "caveats" section below.

CUPS AirPrint support works by combining three open-source technologies:

  • mDNS/DNS-SD (a.k.a. Bonjour, or ZeroConf) for printer discovery
  • CUPS for receiving print jobs that are sent from iOS or OS X devices via the IPP protocol
  • cups-filters + Linux printer drivers for converting the printing data in a print job (PDF or URF) into the native data format of the particular printer device that finally produces the printout.

On Linux, the standard mDNS implementation is called Avahi.

The "cups-airprint" package is about the first item:

  • discovery of CUPS printers on iOS or OS X devices via mDNS/DNS-SD

The CUPS AirPrint support that is provided by the "cups-airprint" package generates and publishes appropriate DNS-SD records for CUPS printers so that iOS and OS X devices can use them.

Prerequisites

All printers for which you want to add CUPS AirPrint support must first be set up to accept print jobs via CUPS. Only shared CUPS printers will be offered for access via AirPrint.

At least some iOS apps send the URF format when printing via AirPrint so that the matching urftopdf filter that is provided in cups-filters >= 1.0.25 is required to convert URF into PDF (PDF is the current standard printing data format which can be further converted into the printer's native data format, cf. Concepts printing). Because cups-filters cannot be reasonably well used with traditional CUPS <= 1.5.4 also a modern CUPS >= 1.6 is in practice required which means in practice there is no CUPS AirPrint support for openSUSE 13.2, 13.1, SUSE Linux Enterprise 11, and anything older. A modern CUPS >= 1.6 plus cups-filters is provided on openSUSE Tumbleweed, openSUSE Leap, and SUSE Linux Enterprise 12 which means CUPS AirPrint support is in practice only possible with openSUSE Tumbleweed, openSUSE Leap, and SUSE Linux Enterprise 12.

It is assumed (and recommended) that the CUPS and Avahi servers are running on the same host, and that the default configuration of Avahi is used. It is also assumed that the (Apple) client devices and the CUPS/Avahi host are on the same subnet.

"cups-airprint" package download

As of this writing (March 2016) the "cups-airprint" package is available from the openSUSE build service development project "Printing" for various openSUSE and SUSE Linux Enterprise versions and it also included in openSUSE Factory wherefrom it gets available in openSUSE Tumbleweed.

For direct RPM package download from the openSUSE build service development project "Printing" got to http://download.opensuse.org/repositories/Printing/ and select your exact matching openSUSE version.

Because "cups-airprint" works in practice only on openSUSE Tumbleweed, openSUSE Leap, and SUSE Linux Enterprise 12, those are the URLs for "cups-airprint" package download:

In addition to cups-filters >= 1.0.25 and cups >= 1.6 the "cups-airprint" package also needs python-cups.

Regarding how to set up CUPS AirPrint support, see the instructions in the /usr/share/doc/packages/cups-airprint/README.SUSE file in the "cups-airprint" package or online in the openSUSE build service at https://build.opensuse.org/package/view_file/Printing/cups-airprint/README.SUSE?expand=1

Caveats

In general: CUPS plus Linux printer drivers do not provide the same functionality as real AirPrint printers.

Sharing CUPS printers (i.e. sharing printers with Linux printer drivers) via appropriate DNS-SD records so that iOS and OS X devices can use them often works but may also fail in spectacular and frustrating ways, which is the reason why there is no native AirPrint support in CUPS.

In general basic printing tasks from iOS or OS X devices should work like printing emails or web pages to standard Letter or A4 media.

But as soon as one goes beyond basic printing tasks things may fall apart. Some examples what may not work when using CUPS as an AirPrint server:

  • Ready media (that's how one gets to pick media sizes on iOS)
  • Proper media selection, scaling, and rotation
  • Printer status ("out of paper", etc.)
  • Duplex printing with some printers
  • Color/grayscale mode
  • Copies

Some of these deficiencies would require major changes to CUPS and its driver architecture to fix, others require driver and (in some cases) printer firmware updates to correct.

If you need full AirPrint functionality you must use an AirPrint printer that has the full AirPrint functionality built-in. For a list of AirPrint printer models see the About AirPrint article at Apple Support.

For reference see the "How to enable AirPrint in CUPS" mail thread on the "CUPS user discussion list" <cups@cups.org> in October 2015, in particular see

Trademarks

AirPrint, Bonjour, and OS X are trademarks of Apple Inc., registered in the U.S. and other countries, see http://www.apple.com/legal/intellectual-property/trademark/appletmlist.html

Further Information