Differences between revisions 3 and 5 (spanning 2 versions)
Revision 3 as of 2017-10-16 22:45:21
Size: 6820
Editor: Heath Loder
Comment: Add additional 'p' to ippserver command (ipserver -> ippserver)
Revision 5 as of 2019-09-07 13:39:46
Size: 7709
Editor: nodiscc
Comment: add CategoryPrinter
Deletions are marked like this. Additions are marked like this.
Line 4: Line 4:
An introduction to driverless printing on Debian 9 (Stretch). An introduction to IPP Everywhere and [[DriverlessPrinting|driverless]] printing on Debian 9 (stretch) and 10 (buster).
Line 9: Line 9:
<<Anchor(problem)>>
Line 12: Line 12:
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.
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.
Line 16: Line 16:
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.
X and 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.
Line 19: Line 19:
<<Anchor(further)>>
Line 21: Line 22:
If the previous section doesn't align with your experience think now of a world in which mobile devices abound. [[PrintQueuesCUPS|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. If the previous section doesn't align with your experience think now of a world in which mobile devices abound. [[PrintQueuesCUPS|Setting up a queue ]] for printing has been described but when a mobile device moves from network to network there could be 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.
Line 23: Line 24:
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. 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 implies that holding the enormous number of PPDs and drivers for every possible printer it is likely to encounter could be a problem. The printing experience would become a nightmare. The [[#solution|elimination]] of the burden of proprietary (or even free) solutions exclusive to a particular printer benefits all operating systems.
Line 25: Line 26:
<<Anchor(solution)>>
Line 46: Line 48:
<<Anchor(server)>>
Line 49: Line 52:
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: 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:
Line 56: Line 59:
| PWG Raster | | rastertopdf | | PWG Raster | | rastertopdf | 
Line 60: Line 63:
After filtering, the output files are put through the page management filter, [[pdftopdfandPageRotation#role|pdftopdf]]. Whatever further processing takes place, the CUPS server would be presented to the client as an Everywhere printer.

<<Anchor(client)>>
Line 62: Line 68:
In co-operation with avahi-daemon the [[PrintQueuesCUPS#cupsbrowsed|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 [[DebianMan:cups-browsed.conf|/etc/cups/cups-browsed.conf]] is set the option
''CreateIPPPrinterQueues''
:
In co-operation with avahi-daemon the [[PrintQueuesCUPS#cupsbrowsed|cups-browsed]] daemon will discover an IPP Everywhere printer and a local print queue will be automatically created. All that needs to be done is to configure [[DebianMan:cups-browsed.conf|/etc/cups/cups-browsed.conf]]:
Line 66: Line 71:
# On stretch.
Line 67: Line 73:
}}}

{{{
# On buster.
CreateIPPPrinterQueues Everywhere
or
CreateIPPPrinterQueues Driverless
Line 71: Line 84:
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. 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.

On Debian 10 (without cups-browsed):

{{{
lpstat -e
or
lpstat -l -v
}}}

will list [[DriverlessPrinting|driverless]] printers (together with local and remote queues). In this case the PPD is generated by CUPS. cups-browsed keeps [[DebianBug:851499|in synch]] with the CUPS PPD generator.
Line 79: Line 102:
<<Anchor(ippserver)>>
Line 126: Line 150:
## If this page belongs to an existing Category, add it below.
## CategorySomething | CategoryAnother

CategoryPrinter

Translation(s): none


An introduction to IPP Everywhere and driverless printing on Debian 9 (stretch) and 10 (buster).

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 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 could be 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 implies that holding the enormous number of PPDs and drivers for every possible printer it is likely to encounter could be a problem. The printing experience would become a nightmare. The elimination of the burden of proprietary (or even free) solutions exclusive to a particular printer benefits all operating systems.

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 | 
+------------+    +-------------+

After filtering, the output files are put through the page management filter, pdftopdf. Whatever further processing takes place, the CUPS server would be presented to the client as an Everywhere printer.

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 is to configure /etc/cups/cups-browsed.conf:

# On stretch.
CreateIPPPrinterQueues Yes

# On buster.
CreateIPPPrinterQueues Everywhere
or
CreateIPPPrinterQueues Driverless

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.

On Debian 10 (without cups-browsed):

lpstat -e
or
lpstat -l -v

will list driverless printers (together with local and remote queues). In this case the PPD is generated by CUPS. cups-browsed keeps in synch with the CUPS PPD generator.

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


CategoryPrinter