(original) (raw)

About the project

The Problem

Printing out of desktop applications is managed by many very different dialogs, mostly depending on which GUI toolkit is used for an application. Some applications like even have their own dialogs, which expose different kind of printing options. This is confuses users a lot, having them to do the printing operation in many different ways. In addition, many dialogs are missing important features.

The Solution

The Common Printing Dialog project aims to solve these problems and provide a uniform printing experience on Linux Desktop Environments. It aims to provide a GUI toolkit independent and modular design so that print dialogs on different desktop environments can offer the same funtionality, as they would all make use of the same print backends. See High level design for details.

High level design

Here’s a bird’s eye view of how the different components of CPD fit together:

Bird's eye view

My contributions

I have developed the following components of the common-print-dialog:

CPD Libraries

The CPD Libraries allow the print dialog frontends and backends to communicate via D-Bus. It comprises of :

The frontend library provides an implementation and wrapper for the org.openprinting.PrintFrontend interface. It also provides additional functionality so that the dialog GUI can deal with printers, settings , options , jobs, etc. in a high level manner, and also, need not be aware of any D-Bus details.

The backend library provides the dbus interface functions to communicate with the frontend. It is based on the org.openprinting.PrintBackend interface.

Dependencies

Installation

$ git clone https://github.com/NilanjanaLodh/OpenPrinting_CPD_Libraries
$ ./autogen.sh
$ ./configure 
$ make
$ sudo make install
$ sudo ldconfig

The project also includes a sample command line frontend that you can use to test whether the installed library and print backends work as expected. See here for more details.

Using the frontend and backend libraries

Use the frontend libraries if you are developing a dialog frontend:
It has pkg-config support: pkg-config --cflags --libs CPDFrontend.
Include CPDFrontend.h in your code.

Similarly, to develop a backend you need to use the CPDBackend library. It too has pkg-config support: pkg-config --cflags --libs CPDBackend. Include CPDBackend.h in your code.

CUPS Backend

The CUPS backend is available as an autoactivable dbus service called org.openprinting.Backend.CUPS, which is woken up when any frontend is present and exits immediately when all frontends have exited. Also, as it is developed in accordance with the latest CUPS API(2.2.*) , it also automatically supports ipp printers, eliminating the need for a separate IPP backend.
It uses the CPD Backend Library for dbus communication, thus is an implementation of the org.openprinting.PrintBackend interface.

Dependencies

Installation

$ git clone https://github.com/NilanjanaLodh/OpenPrinting_CUPS_Backend
$ ./autogen.sh
$ ./configure 
$ make
$ sudo make install

Acknowledgements

Thanks a lot to my mentors Till Kamppeter and Aveek Basu for their invaluable guidance throughout this project!

Mentor details