There is an interesting hidden feature available in Ubuntu 18.04 LTS and newer. To enable this feature, first install cpdb-backend-gcp.
sudo apt install cpdb-backend-gcp
Make sure you are signed in to Google with GNOME Online Accounts. Open the Settings app1 to the Online Accounts page. If your Google account is near the top above the Add an account section, then you’re all set.
Currently, only LibreOffice is supported. Hopefully, for 19.04, other GTK+ apps will be able to use the feature.
This feature was developed by Nilanjana Lodh and Abhijeet Dubey when they were Google Summer of Code 2017 participants. Their mentors were Till Kamppeter, Aveek Basu, and Felipe Borges.
Till has been trying to get this feature installed by default in Ubuntu since 18.04 LTS, but it looks like it won’t make it in until 19.04.
I haven’t seen this feature packaged in any other Linux distros yet. That might be because people don’t know about this feature so that’s why I’m posting about it today! If you are a distro packager, the 3 packages you need are cpdb-libs , cpdb-backend-gcp, and cpdb-backend-cups. The final package enables easy printing to any IPP printer. (I didn’t mention it earlier because I believe Ubuntu 18.04 LTS already supports that feature through a different package.)
Save to Google Drive
In my original blog post, I confused the cpdb feature with a feature that already exists in GTK3 built with GNOME Online Accounts support. This should already work on most distros.
When you print a document, there will be an extra Save to Google Drive option. Saving to Google Drive saves a PDF of your document to your Google Drive account.
This post was edited on October 16 to mention that cpdb only supports LibreOffice now and that Save to Google Drive is a GTK3 feature instead.
October 17: Please see Felipe’s comments. It turns out that even Google Cloud Print works fine in distros with recent GTK3. The point of the cpdb feature is to make this work in apps that don’t use GTK3. So I guess the big benefit now is that you can use Google Cloud Print or Save to Google Drive from LibreOffice.
I just tried in Arch Linux (no cpdb-* packages), and Saving to Google Drive is supported out of the box.
It turns out that “Save to Google Drive” is a GNOME Online Accounts feature in gtk3. cpdb is something different so I really messed up this blog post.
Hi, thanks for sharing the outcome of the internship.
Just to clarify, the Gtk+ printing dialog already supports Google Cloud Printing for quite some time.
The cpdb-backend-gcp project was created in order to decouple the Google Cloud Printing support from the Gtk+ printing dialog, and therefore provide a common backend that could be used by various clients over DBus (such as LibreOffice, Firefox, or other DEs such as KDE and XFCE).
I would like to suggest that CPDB be enhanced to offer printing the PDF to a specific “folder” on my Google Drive instead of the general Google Drive location where I might have dozens of other files.
If a specific “folder” could be named then that “folder” could become the equivalent of a print queue for a local script running on my PC/Laptop that detects new files in the folder and then prints them locally, deleting them afterwards.