gsoc:google-summer-code-2022-openprinting-projects

This is an old revision of the document!


Google Summer of Code 2022: OpenPrinting projects

Contact

Important: We protect the e-mail addresses of our mentors and mailing lists against spam bots. Please replace all occurrences of “ at ” and “ dot ” by “@” and “.” resp.

Mailing list: printing-architecture at lists dot linux-foundation dot org

IRC: #openprinting on Freenode

OpenPrinting GitHub

Keep in touch with OpenPrinting's state of the art.

Code License: See project descriptions

Organization Administrators

The participation of the Linux Foundation in the Google Summer of Code is organized by Till Kamppeter (till at linux dot com) and Aveek Basu (basu dot aveek at gmail dot com).

Introduction

Printer Drivers get Printer Applications

CUPS, printing environment used by Linux and most other non-Windows operating systems, supports the different printer models with the help of printer drivers, consisting of PPD (PostScript Printer Description) files to describe the printer's capabilities, filters to convert the incoming print jobs into the printer's native language, and sometimes also backends, to support non-standard communication protocols between the computer and the printer hardware.

Modern printers do not need printer drivers (printer-model specific software or data) as they use standard methods for everything: DNS-SD to advertise themselves in the network, IPP (Internet Printing Protocol, at least version 2.0) as a communication protocol with which the printer cannot only print and inform about its status but also provide a complete description of its capabilities, and known, standard PDLs (Page Description Languages). These are driverless IPP printers following the IPP Everywhere, Apple AirPrint, Mopria, and/or Wi-Fi Direct Print standards. So printer drivers are only needed for specialty printers or legacy printers.

See also the Debian documentation about driverless printing with CUPS.

We are also moving to sandboxed packaging in modern operating system distributions, where applications are completely isolated from each other, having their own file systems and well-defined paths to communicate with other applications.

And already several years ago we moved from PostScript to PDF as standard data format for print jobs.

All this made us rethink how printer drivers should look like. Michael Sweet has already deprecated PPD files more than a decade ago, when we switched to PDF-centric printing (and the format is also not developed any more by Adobe), but due to lack of a replacement we have continued using them. Some years ago Michael Sweet introduced the concept of Printer Applications as replacement for the classic CUPS printer drivers.

A Printer Application is nothing else than a daemon which emulates a driverless IPP (at least IPP Everywhere) network printer. It advertises itself, speaks IPP, and understands standard protocols as an actual network printer, and even has an administration web interface. Internally, it converts the incoming jobs to the printer's native, often proprietary PDL and sends them off to the physical, non-driverless printer on USB, parallel port or with any network protocol like LPD or raw socket (port 9100). The capabilities which the Printer Application reports on IPP requests or in its DNS-SD record are the capabilities of the printer.

This solves many problems:

  • No use of the obsolete PPDs any more
  • For CUPS (or any other printing environment) driverless IPP printers and Printer Applications behave the same, no printer driver support needed any more
  • If CUPS is in a sandboxed package (CUPS Snap) it is not possible to install classic CUPS drivers, as an external program cannot access CUPS' directories for PPD files, filters, and backends. The Printer Application only communicates with CUPS via IP, as a network printer, so CUPS can be sandboxed.
  • Printer Applications themselves can be sandboxed, so they can be distributed as OS-distribution-independent packages on a central download place (like the Snap Store). This reduces the development and testing cost for the printer manufacturers a lot.

Now we already have retro-fitted practically all of the classic printer drivers, which are available as free software and come with typical distributions like Debian, into Printer Application Snaps which are available in the Snap Store.

And for many label printers we have already a native (no retro-fit from classic driver) Printer Application: LPrint.

In ~2 years from now, CUPS 3.x will be released and this is the first CUPS which has dropped PPD and printer driver support, requiring Printer Applications. See the roadmap.

IPP Scan and Scanner Applications

Having multi-function printers in mind (printer, scanner, also often fax in one device) the IPP Scan standard got created, which allows the use of IPP for both printing and scanning. Especially driverless scanning is possible using the same principles as with driverless printing. Manufacturers actually use eSCL and WSD for driverless scanning instead (also supported in free software), but IPP Scan also helps to get scanning working in environments of only sandboxed packages and to more easily distribute scanner drivers.

Currently, SANE is the standard platform for scanning. Here a frontend, for example a GUI user appication, like simple-scan or X-SANE, looks for backends (scanner drivers) which are supplied as dynamically loadable shared libraries in a given directory, runs each backend so that it returns back which of its supported scanners are currently present, having the frontend end up with a list of all currently available scanners and through which backend they are available.

This architecture is not viable for sandboxed packaging, where the user applications are in separate sandboxed packages and one wants to be able to add scanner drivers, preferrably each scanner driver also in a sandboxed package.

So as we create Printer Applications we create Scanner Applications emulating a driverless IPP scanner using the IPP Scan standard. Now scanner drivers can be distributed in individual sandboxed packages, OS-distribution-independent, and for multi-function devices one can even distribute a combined Printer/Scanner Application. The sandboxed packages of user applications which scan only need a backend for IPP Scan and this discovers all Scanner Applications (and scanners in native network devices).

So we are going to replace SANE in the role of an interface between scanning user applications and scanner drivers by the sandboxing-ready IPP Scan. SANE will continue to exist, but to provide the legacy scanner drivers enclosed in a Scanner Application.

Work on extending the Printer Application framework PAPPL has already been started in GSoC 2021.

What we are currently doing at OpenPrinting

At least what we are doing on the coding side is to move the architecture of Printer and Scanner Applications and the support for sandboxed packages for printing and scanning forward. Especially we want to get printing and scanning “just work” also in completely sandboxed OS distributions and allow printer and scanner hardware manufacturers to provide drivers as distribution-independent, easily downloadable and installable packages.

This principally happens in the following projects:

See also

Project Ideas

+ Still needs to get updated!! +++** =====GUI for listing and managing available IPP Print/Scan services (or DNS-SD-advertised network services in general)===== As described above, all available printers and scanners will simply be IPP services (physical network printers or Printer Applications) and drivers will be Printer Applications. They are managed by their web administration interfaces and/or IPP System Service. Local CUPS queues are simply automatically popping up for each IPP print service available. Due to this we do not need any more the classic printer management tools where the local CUPS queues are listed and you modify their properties. Instead, your printer/scanner management tool should list all IPP services, native hardware devices, Printer Applications, shared CUPS queues on remote servers. For each service (1 service = 1 host:port) a main entry with sub-entries for each printer, scanner, or fax out facility. These entries should have action buttons, for main entries to open the web interface in a browser, pop up an IPP System Service status/control window, ... and for sub-entries buttons to go to the web interface page of this printer, pause/resume/set-as-default quick-access buttons, ... This way the user knows which IPP services are available and can easily click to their management interfaces (many users do not know about web interfaces for network services or how to find them). Especially if he installs a Printer Application from the Snap Store he needs to know how to set up his printer with it. All the information needed to create the list is provided by DNS-SD (Avahi). DNS-SD advertises all printers, scanners, web interfaces, IPP System Service interfaces, ... see the output of "avahi-discover" and "avahi-browse". And with this one is already close to having a general network service management tool, also listing the DNS-SD services which are not related to printing with buttons to their web interfaces (imagine the user can open the web interface of his router with a simple mouse click). This would be the "user-friendly" avahi-discover then, showing the services in a user-friendly order an presentation. The student's task is to implement such a tool in GTK, ideally as a module for the GNOME Control Center. Mentors: Till Kamppeter, Project Leader OpenPrinting (till at linux dot com), GNOME/GTK developers, TBD Desired knowledge: %%C/C++%%, GTK, DNS-SD/Avahi, CUPS/IPP Code License: GPL-2+ and LGPL-2+ =====GUI to guide the user to the correct Printer Application===== Modern printers usually are driverless IPP printers, and those get discovered and set up fully automatically with CUPS, no Printer Application is required for them, so it is easy for users to get up and running with them. Printers which do not do driverless IPP are either legacy printers, themany older printers which got developed before driverless IPP printing existed, and specialty printers. These need Printer Applications. As there will be several different Printer Applications and each one supporting another set of printers it is not trivial for the user to discover available non-IPP-driverless printers and find out which is the Printer Application to use and whether it is already installed. So we need some guide for the user. The idea is a GUI tool which lists available, non-IPP-driverless printers, local (USB) and network devices. If the user selects one of them, all installed Printer Applications which support this printer are shown, and for each a button to open the Printer Application's web interface and also a quick auto-add-this-printer button. In addition to the list of suitable Printer Applications there should also be a button which does a fuzzy search for the printer make and model on the Snap Store to find Printer Applications which are not installed on the local system. The student's task is to implement such a tool in GTK, ideally as a module for the GNOME Control Center. Mentors: Till Kamppeter, Project Leader OpenPrinting (till at linux dot com), GNOME/GTK developers, TBD Desired knowledge: %%C/C++%%, GTK, DNS-SD/Avahi, CUPS/IPP Code License: GPL-2+ and LGPL-2+ =====Converting classic CUPS printer drivers into Printer Applications (multiple students)===== To replace classic Linux distributions based on RPM or DEB packages by completely sandboxed/all-Snap distributions it is also needed to assure that hardware which worked before will still work in the new distribution. For this we want to retro-fit all printer drivers into Printer Applications and make these available as Snaps in the Snap store. This way for all printers which worked under Linux before, there is a driver in the Snap Store, so all distributions which support Snap packages (have snapd installed) will support all these legacy printers without needing to take the responsibility by themselves. Together with the CUPS Snap we can have all-Snap distribution with the same printing coverage as conventional distributions. The retro-fit should not be very complex, as we have the Printer Application library PAPPL and a printer driver retro-fit library (will be available before coding starts) containing most of the code of the PostScript Printer Application at hand. The intention is to retro-fit all common printer driver projects using these tools and avoiding to modify the original driver's code, as we do not have the printer hardware for testing and in most cases the original driver code is not maintained any more. Driver projects are (derived from "apt search printer-driver-" on Ubuntu Hirsute): * Foomatic/Ghostscript built-in * "brlaser": (Some) Brother laser printers * "c2050": Lexmark 2050 Color Jetprinter * "c2esp": Kodak ESP AiO color inkjet Series * "cjet": Canon LBP laser printers * "dymo": DYMO label printers * "escpr": Epson Inkjet that use ESC/P-R * "foo2zjs": ZjStream-based printers * "fujixerox": Fuji Xerox printers * HPLIP: HP printers and multi-function devices * "m2300w": Minolta magicolor 2300W/2400W color laser printers * "min12xxw": KonicaMinolta PagePro 1[234]xxW * "oki": OKI Data printers * "pnm2ppa": HP-GDI printers * "ptouch": Brother P-touch label printers * "pxljr": HP Color LaserJet 35xx/36xx * "sag-gdi": Ricoh Aficio SP 1000s/SP 1100s * "splix": Samsung and Xerox SPL2 and SPLc laser printers The student's task here is to retro-fit one or more driver projects, so that these new Printer Applications can be put into the Snap Store. In some cases there are also some special tasks: * "foo2zjs" should be able to let the user download/add firmware files and color profiles and make the firmware files be loaded into the printer everytime when it is turned on. * Foomatic needs to support options of string or numeric style, which in the original are implemented with PPD extensions. * HPLIP retro-fit: HP should not maintain such a retro-fit as-is, they should go native, but this can be of help for them and also of help for users until HP switches over. Especially it should NOT be put into the Snap Store under the HPLIP name * Closed-source drivers (not in the example list) could need to run the filters in a chroot as they can have hard-coded directory paths Mentors: Till Kamppeter, Project Leader OpenPrinting (till at linux dot com), Michael Sweet, author of CUPS and PAPPL (msweet at msweet dot org), Jai Luthra (luthrajaiji at gmail dot com), Smith Kennedy, HP (smith kennedy at hp dot com), Dheeraj Yadav (dhirajyadav135 at gmail dot com), TBD Desired knowledge: %%C/C++%%, CUPS Code License: Apache 2.0 =====Firmware and other file handling in PAPPL===== For some printers there are firmware files, either as an upgrade or if the printer is a cheaper model which does not have non-volatile memory to hold the printer's firmware, requiring the firmware be loaded from the computer each time the printer is turned on. Other printers could be enhanced with fonts or custom color profiles. This can easily be handled by the Printer Application, offering an appropriate page in its administration web interface where the user can upload files into Printer Application's file space and the Printer Application would apply them somehow, as loading them into the printer as update or enhancement, loading them into the printer everytime when the printer is turned on, use them in the job filtering process, ... An example already exists, in the [[https://github.com/OpenPrinting/ps-printer-app/

gsoc/google-summer-code-2022-openprinting-projects.1643219946.txt.gz · Last modified: 2022/01/26 17:59 by till