Ready to get started?Download WordPress

Plugin Directory

Google Cloud Print Library

Some routines used for sending simple text files to Google Cloud Print

This plugin is mainly for programmers to use. It contains an options page to set up a connection to a Google account, and allows you to choose a Google Cloud Print printer from your account and to test printing to it.

The main use of this plugin is for developers of other plugins to deploy, and integrate with their plugins. For example, I have developed a plugin that can send orders from a web shop automatically to Google Cloud Print.

If you find it useful in your project, then please do consider a donation: http://david.dw-perspective.org.uk/donate

How can a developer use it?

Here's some example code:

// Ensure that we've got the Google Cloud Print Library Object
global $googlecloudprintlibrary_gcpl;
if (isset($googlecloudprintlibrary_gcpl) && is_a($googlecloudprintlibrary_gcpl, 'GoogleCloudPrintLibrary_GCPL')) {

    // The first parameter to print_document() is the printer ID. Use false to send to the default. You can use the get_printers() method to get a list of those available.

    $printed = $googlecloudprintlibrary_gcpl->print_document(false, get_bloginfo('name').' - test print', '<b>My HTML to print</b>');

    // Parse the results
    if (!isset($printed->success)) {
        trigger_error('Unknown response received from GoogleCloudPrintLibrary_GCPL->print_document()', E_USER_NOTICE);
    } elseif ($printed->success !== true) {
        trigger_error('GoogleCloudPrintLibrary_GCPL->print_document(): printing failed: '.$printed->message, E_USER_NOTICE);


Requires: 3.2 or higher
Compatible up to: 3.8.3
Last Updated: 2013-12-10
Downloads: 430


5 stars
5 out of 5 stars


Got something to say? Need help?


Not enough data

0 people say it works.
0 people say it's broken.