Mimeo Connect Cloud Print API - Support
Welcome to the Mimeo Connect Cloud Print API, where you can find what you need to offer commercial printing in your mobile and web apps. Let us know if you need help!
|Return to Listing||How To - Detail||
Print Bound Documents with Google Cloud Print
This sample code will let any developer launch a Google Cloud Printer, that Google Apps users can add as Google Cloud Printer, and print books, magazines, and other bound documents using Mimeo.
First you need to create the definition of a Google Cloud Printer. Most people working with Google Cloud Print (including Google) think of a cloud printer being a local printer you want to register in the “clouds”, so it is accessible anywhere. Here at Mimeo we think of cloud printers a little differently.
Mimeo is a cloud printer. You can define any document in your Mimeo account, and print to it using Google Docs and Google Cloud Printer.
All it takes is the code demonstrated here deployed on your companies servers. It will handle the integration between Google Cloud Print and Mimeo Connect.
Before we get started, this demonstration has a couple dependencies:
- PHP - This is a PHP sample
- Zend - This sample uses the Zend library.
- Google Client Login - This utilizes the Google Client Login, I will do an update in near future using OAuth.
- Mimeo REST Client - This depends on the Mimeo REST PHP Client Library for making calls to Mimeo Connect.
Now, here is how to do it:
1) Define a commercial cloud printer with Google Cloud Print. To define a Mimeo / Google Cloud Printer you need a few things:
- Name - A plain english name for printer.
- Description - A plain english description of your printer.
- Proxy - A unique identifier for your printer, defined by you.
- Status - Status of printer, probably just “Online”.
- PPD - XPS or PPD definition of printer. Here is base PPD definition I’m using.
- Document - A product / document ID for the shell of your bound document containing the details of your book or magazine, and how it will be printed.
With all of this you can register a printer with the Google Cloud Print Services Interface.
2) Log User In To Their Google Account using Google Client Login:
3) Register your printer definition with users Google Account:
4) Print. Now any user who registers this printer, can print with their Google Apps to the printer you have defined. Any Google Doc the choose to print here will be sent to this registered cloud printing for handling.
5) Print Job(s). The next part is to have your registered printer process all jobs that are queued:
Of course this is just the basics needed for letting a user login with Google Account, Define and Register a Cloud Printer for your company, allow users to print to it, and then enable your printer to print all jobs.
How you invite users, restrict users, queue print jobs, and provide oversight and security for your Google Cloud Printer is up to you.
What type of binding, cover stock, paper and other characteristics of the bound document can be defined in your Mimeo account, by creating new documents and changing the Document_ID of your printer.
This example just takes the 1-3 Day Shipping Option returned from Mimeo Connect Cloud Print - Order Service API. Others options are available.
Billing for print jobs can be handled either through Mimeo account credit, credit card on file, or passed along with the code displayed above.
You may want to consider custom Google Docs Marketplace templates to match the documents you specify inyour Mimeo.com account. Any Google Apps users can use a template to build a bound documents then print using the registered Google Cloud Printer. This will ensure higher quality bound documents.
This is just one sample of what is possible for commercially bound documents like books, magazines, newsletters and reports to Mimeo.com using Google Apps and Google Cloud Print. The code sample for this how to can be downloaded from Github.
Tags: Books, Bound Documents, Google Cloud Print, Google Docs, Magazine