Differences between revisions 2 and 3
Revision 2 as of 2016-11-04 00:21:45
Size: 6819
Editor: Brian Potkin
Comment: Corrected a paragraph in "Debian CUPS as an IPP Everywhere Client". Thanks to Till Kamppeter. Added "See Also". Corrected "PostScript".
Revision 3 as of 2017-10-16 22:45:21
Size: 6820
Editor: Heath Loder
Comment: Add additional 'p' to ippserver command (ipserver -> ippserver)
Deletions are marked like this. Additions are marked like this.
Line 98: Line 98:
ipserver -vvv -p 631 -m everywhere test ippserver -vvv -p 631 -m everywhere test

Translation(s): none

An introduction to driverless printing on Debian 9 (Stretch).

The Problem

To print to a networked printer a discovery protocol is first required to find the printer. Later on a print protocol and PDL (Page Description Language) to send the job to the printer has to be chosen. Every printer manufacturer has gone about implementing these procedures in its own way, sometimes by using or adapting standard protocols, sometimes by devising its own protocol, sometimes by using its own proprietry PDL.

The result is many thousands of driver files in use across Linux, Mac OS X and the Windows operating systems and a variety of techniques for printer discovery and processing a print job. A user's experience of setting up a printer and using it can be fraught and having the system in good shape dependent on possibly keeping up-to-date with a vendor's changes to software. Setting up a printer can be seen (justifiably or not) as convoluted, complex, opaque and undebuggable. Being offered three or more drivers to choose from for each supported printer may be rather confusing. Contrast the printer situation with the behaviour of other peripherals like keyboards, mice, cameras and USB mass storage where the adherence to a standard usually ensures a good experience.

Further Analysis of the Problem

If the previous section doesn't align with your experience think now of a world in which mobile devices abound. Setting up a queue for printing has been described but when a mobile device moves from network to network there is a need to re-configure the device in order to print. This isn't what might be called user-friendly and is very likely beyond what most users would want to do or are capable of doing.

Even if setting up a queue time and time again was tolerable you have to consider the limitations of the mobile device. Limited storage capacity alone means it cannot possibly hold the enormous number of PPDs and drivers for every possible printer it is likely to encounter. The printing experience would become a nightmare.

The Solution

For a number of years the Printer Working Group (PWG) has been working with printer vendors and networking experts to implement IPP Everywhere. The standard for printers is now completed and IPP Everywhere devices are beginning to be marketed.

The idea of IPP Everywhere is to dispense with vendor-specific software on the client (a computer or mobile device) and have driverless printing supported printers. For discovery, the printer must support

A client must support

  • DNS-SD and/or WS-Discovery.

Regarding document formats: the printer must support

  • PWG Raster Format and JPEG File Information Format (JFIF). These are MIME types image/pwg-raster and image/jpeg respectively.
  • PDF format (application/pdf), depending on the IPP version.

The crucial protocol used for communication between printer and client is IPP. It is the native protocol of CUPS and Debian has the newest version. It has the important ability of being able to query the printer for its capabilities and pass these to the client for display in its applications.

Debian CUPS as an IPP Everywhere Server

To get a network printer to service an IPP Everywhere client with any printer shared by a CUPS server we need CUPS to emulate an IPP Everywhere printer. MIME types image/jpeg and application/pdf sent by an IPP Everywhere client present no problem because they have been supported by cups-filters for some time. image/pwg-raster was not supported but now there is a rastertopdf filter so a client will have any of the three supported document formats processed through the filter chain:

  Input file           Filter
+------------+    +-------------+
| PDF        |    |    n/a      |
| JPEG       | -> | imagetopdf  | -> pdftopdf -> PDF out -> Convert to something the printer understands -> Printer
| PWG Raster |    | rastertopdf |
+------------+    +-------------+

Debian CUPS as an IPP Everywhere Client

In co-operation with avahi-daemon the cups-browsed daemon will discover an IPP Everywhere printer and a local print queue will be automatically created. All that needs to be done in /etc/cups/cups-browsed.conf is set the option CreateIPPPrinterQueues:

CreateIPPPrinterQueues Yes

Note that it is actual printers which are discovered, not IPP Everywhere print queues broadcast by a CUPS server.

cups-browsed has a PPD generator for IPP Everywhere printers and a PPD will automatically be created in /etc/cups/ppd. The PPD is based on the capabilities of the printer polled over IPP so these and user-settable options will be shown in the print dialogs of applications and by command line tools.

The filtering chain on the client is dependent on what the printer will accept. If it accepts the minimum (PWG Raster and JPEG) the client will output PWG Raster. If PDF is an added accepted file type the client will send PDF. The printer may also accept other non-compulsory MIME types like PostScript or PCL.

Debian has full support for IPP Everywhere through Avahi, CUPS and cups-browsed.

Experiencing IPP Everywhere Behaviour

It is convenient to use two machines for this. Otherwise a single machine running a virtual machine is necessary. First download and install the cups-ipp-utils package:

apt-get install cups-ipp-utils

and read the manual for ippserver.

On the same machine stop cups

systemctl stop cups

and run ippserver with

ippserver -vvv -p 631 -m everywhere test

On the other machine check for a local print queue being set up with

lpstat -a

and a PPD existing in /etc/cups/ppd.

Print to the queue:

lp -d everywhere <file>

and look at the error_log for a record of the filter chain.

See also