WPPizza – Google Cloudprint

Description

send any WPPIZZA orders directly to your google cloud connected/enabled printer while also being stored on your google drive

if no printer is connected, (pdf) files of your orders will just be stored in your google drive without being printed

Requirements

  • WPPIZZA 2.11.9+,  cURL 7.16.2+
  • As of version 4.0+ WPPizza v3.x compatible
  • you must (obviously) have a google account

IMPORTANT NOTES

  • I am not able to advise you on your specific printer as to how to set it up, if it is even capable of receiving google cloudprint documents or indeed as to what format(size) your printer will be able to print documents in received from the google cloudprint service
  • The “WPPizza – Google Cloudprint” plugin simply sends an order according to your chosen/selected/set template settings in “Wppizza->Templates->Print” to the google cloudprint service.
  • When a document has been sent by this plugin to the google cloudprint service, it is *entirely* between the google cloudprint service and your printer to print the document as required. The plugin/software has no influence whatsoever about that process once the wppizza order has been sent to the cloudprint service
  • Default print templates are set to be 100% page width (editable in wppizza->template). It is the printers responsibility to make page output for printing to fit onto the media selected. (ALthough some printers can be tricked by simply setting the margins or width of the print template css)
  • The plugin has ZERO control over your printer sizing. i.e if you need to print to A5 but your printer will always try to print A4 when receiving cleoudprint documents there is nothing the plugin can do about this and you will have to contact the manufacturer
  • The following link might be of interest too: https://www.wp-pizza.com/topic/question-google-cloudprint/

Installations

  • install by uploading the zip file in the normal wordpress manner from withing the plugin screen (add new->upload) and activate

Troubleshooting

  • The first thing to do is to enter “__google_docs” (without the quotes) into the “Printer Id” settings of the plugin to make sure the plugin is not the one causing errors – ding so will bypass/ignore any printer connections to be able to narrow things down
  • Once you have done this, do an order and check if you have a pdf/document of that order in your google drive. If this is the case, the plugin is working as expected and the problem is a communication error between google cloudprint service and your printer
  • If you do NOT have a document in your google drive now, the problem is – most likely – software related (either the plugin itself or other scripts interfering or causing issues). So turn on debug and check the debug.log.
  • You also want to check if there is perhaps a related logfile in [wp-content-path]/plugins/wppizza/logs which might tell you something
  • If you DO however have a document in your google drive with the “__google_docs” settings , the plugin is working as expected and you will have to check the communication between the google cloudprint service and your particular printer.
  • I.e re-enter and double check the printer id, token etc etc (there are reports of WIN10 updates resetting/changing printer id’s !). Then again check the above mentioned logfiles for clues

Setup Instrctions

A)  Add Printer to “Google Cloud Print”

  1. to add printers to Google Cloud Print follow the instructions here: https://support.google.com/cloudprint/answer/1686197
  2. for a list of cloud ready printers (according to google) please see here http://www.google.com/cloudprint/learn/printers.html

B) Creating Google OAuth Credentials 

  1.  Create a new project to get the corresponding OAuth credentials using Google developer console by going to https://console.developers.google.com/
    (you may have to log in to your google account if not already logged in)
  2. click on “Create a project”gpc-setup-1
  3. give the project a name and click on “Create”. gpc-setup-2
  4. wait a few moments until it has been created
  5. click on “Enable and manage APIs” gpc-setup-3
  6. go to “Credentials” -> “OAuth consent screen”, enter a product name and click save. gpc-setup-4
  7. go to “Credentials” -> “Credentials” -> “Create Credentials” and select “OAuth client ID”.gpc-setup-5
  8. In the following screen choose “Web application”, give it a name and enter the “Authorized redirect URIs” as given to you in your “wppizza->cloudprint” screen. Click “Create”.gpc-setup-6
  9. In the resulting screen, copy the “Client ID” and “Client Secret” into the relevant field in your wppizza->cloudprint settings and save.gpc-setup-7
  10. Click on “Click here to get token” in wppizza-> google cloudprint (will open in a new window). You will get a screen similar to this.gpc-setup-8
  11. Click “Allow”. If you do not get this screen, but error messages , double check your Redirect URIs settings under “APIs & Auth -> Credentials” (see 8 above). These must be EXACTLY the same as the url displayed in the wppizza->cloudprint settings (watch out for http:// vs. https:// for example
  12. Click on “Click here to get Token” in wppizza->google cloudprint (if you need to login into google again, do so ) and copy and paste this access token into the relevant token field and save.gpc-setup-9

that should be it it

 

Other

in case this is of interest to anyone using interfax to send orders as faxes:

there also *appears* to be an implementation by interfax to send google docs as fax documents instead/as well.

although I have no experience with this particular interface, this link  might be useful to someone and I would be glad to hear if this works (or not as the case may be)

Screenshots – (click images for larger versions)

Admin options
Google Drive
google-cloudprint-gdrive
Order Print
google-cloudprint-gdrive-order