>
Download This Plugin | |
Download Elegant Themes | |
Name | Google Cloud Print Library |
Version | 0.3.2 |
Author | David Anderson |
Rating | 100 |
Last updated | 2015-01-30 09:48:00 |
Downloads |
593
|
Download Plugins Speed Test plugin for Wordpress |
Home page PageSpeed score has been degraded by 0%, while Post page PageSpeed score has been degraded by 0%
Google Cloud Print Library plugin added 5 bytes of resources to the Home page and 6 bytes of resources to the sample Post page.
Google Cloud Print Library plugin added 0 new host(s) to the Home page and 0 new host(s) to the sample Post page.
Great! Google Cloud Print Library plugin ads no tables to your Wordpress blog database.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, it has been integrated into this plugin that can send orders (invoices, delivery and packing notes) from a WooCommerce 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
Here's some example code:
// Ensure that we can get a Google Cloud Print Library object
if (class_exists('GoogleCloudPrintLibrary_GCPL_v2')) {
// 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.
$gcpl = new GoogleCloudPrintLibrary_GCPL_v2();
$printed = $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);
}
}