GSoC 2021 Final Work Product — The Linux Foundation: Remove dependency of PPD files from common UNIX printing system.

Introduction

Aim of the project:

  1. Few years ago, Michael Sweet deprecated use of PPD files when we switched to PDF-centric workflow but due to lack of replacement we have continued using them.
  2. With no more use of obsolete PPD files, we can make system more sandboxed where applications are completely isolated from each other having their own file system and well-defined paths for communicating to each other.

Approach for the project:

To understand this, we first need to know what does a PPD file do. Basically, a PPD file is used to get info about printer capabilities like default margins, if the printer is a color-printer, if the printer support duplex printing, supported fonts, supported PDLs(page descriptive languages) so on and so forth. So, if we can somehow get these printer properties from the printer itself instead of a PPD file, then we are done. Here printer IPP attributes come to the rescue. Although IPP attributes are supported only by IPP printers and not by legacy printers so if IPP attributes are not there we make use of PPD file and if later too is not there we try to use some default values for these capabilities that are most likely to be supported by many printers(democratic system :).

Work done:

Here is the link for all the pull requests that I made during my GSoC coding period. Please note that all these PR(s) got merged except the 13th(2nd last) and 14th (last). These PRs are still open and will probably be merged sooner or later.

  1. Defined functions ippRasterMatchIPPSize() and getBackSideAndHeaderDuplex() and added support of printer and job IPP attributes in pclmtoraster filter function.
  2. Added support of printer and job IPP attributes in pdftopdf() filter function.
  3. Added support of printer and job IPP attributes in imagetopdf() filter function.
  4. Added support of printer and job IPP attributes in imagetoraster() filter function.
  5. Memory leak fixed in imagetoraster() filter function.
  6. Double free in imagetoraster() filter function fixed.
  7. Added support of printer and job IPP attributes in pdftops() filter function.
  8. Silenced compiler warnings in pdftops() filter function.
  9. Added support of printer and job IPP attributes in texttotext() filter function.
  10. Defined function joinJobAttributesAndOptions() and added support of printer and job IPP attributes in Ghostscript() filter function.
  11. Added support of printer and job IPP attributes in rastertopdf() and rastertopclm() filter function.
  12. print-render-support added in Ghostscript and imagetoraster filter function.
  13. Added support of printer and job IPP attributes in bannertopdf() filter function.
  1. Margins updated in texttopdf filter function when no PPD file is used.
  2. Added cups package configuration file.
  3. Default browsing is made dependent on the user’s choice.
  4. Made true case insensitive for certain options in PPD file and corrected documentation for existing clients.
  5. Added cupsfilter error messages to help users to know what’s the problem occurring.

Status of the project:

So, all the filter functions have already been fully worked upon and tested except for few filter functions(like pstops) that are explicitly made for postscript printers. Since postscript printers always come with a PPD file and in future too, if a new printer is released it will come with a PPD file so we don’t have to worry about such printers and filter functions like pstops. Some other filter functions like commandtoescpx and commandtopclx too are not to be worried about since they are never practically used. Other filter functions have already been fully worked upon and tested.

Experience:

I have learned a lot during the GSOC period and the code speaks for itself. With several PRs merged and several approaches discussed, I think that I have become a better developer and a team worker.
I communicated with my mentors and met amazing people along the way and learned amazing stuff from them.

Acknowledgement :

I am very thankful to my mentor Till Kamppeter sir. Without him, the work never would have been this joyful and rewarding. He was always available to answer my questions on time and also actively ensured that my Pull Requests were reviewed and that the coding standards were up to the mark. He also provided appropriate links to resources and made sure that the deadlines were met through regular meets. I love the OpenPrinting community for its welcoming and enthusiastic nature.

Engineer