Professional Documents
Culture Documents
CHAPTER 1
INTRODUCTION
Google Cloud Print is a Google service aiming to enable any application (web, desktop, mobile) on any device in the network cloud to print to any printer without Google having to create and maintain printing subsystems for all the hardware combinations of client devices and printers, and without the users having to install drivers to the client. Applications submit print jobs to the cloud print service via the API offered by Google. Google Cloud Print then sends the print job to the selected printer which the user has previously registered with the service. New printers which are called cloud-aware and
connect directly to the cloud print service, while legacy printers will use a Google Cloud Print Proxy. Google defines a Cloud Print Proxy as: a piece of software that runs on a computer connected to a non-cloud-aware printer, a small add-on hardware device that contains the proxy interface and connects to the printer, or firmware that is built in to printers of the future. Currently Google provides a proxy that works on Windows with Google Chrome. They will be supporting Mac and Linux versions in the near future. The Google Cloud Print service interfaces allow you to create a cloud print proxy that gives you a virtual cloud printer you can send jobs to. In Google Chrome OS, all applications are web apps. Therefore, in designing the printing experience for Google Chrome OS, we want to make sure printing from web apps is as natural as printing from traditional native apps is today. Additionally, with the proliferation of webconnected mobile devices such as those running Google Chrome OS and other mobile operating systems, we don't believe it is feasible to build and maintain complex print subsystems and print drivers for each platform. In fact, even the print subsystems and drivers on existing PC operating systems leave a lot of room for improvement.
Dept. of ISE
T.C.E. Gadag.
CHAPTER 2
2.1 APPLICATIONS
Any type of application can use Google Cloud Print, including web apps (such as Gmail) and native apps (such as a desktop word processor or an Android/iPhone app). These apps call Google Cloud Print APIs. They can use these APIs to collect the necessary data to show their own user interface for custom print options or simply use the common print dialog that Google Cloud Print will provide. There are also APIs for querying print job status. Additionally, when the APIs are available, third-party app developers will be able to use Google Cloud Print in their web, desktop, and mobile apps as well.
Dept. of ISE
T.C.E. Gadag.
2.4 Printers
And, finally, the number one question people ask is, "How do the printers communicate with Google Cloud Print?" The answer is, "It depends on whether the printer is a cloud-aware printer or a legacy printer."
GOOGLE CLOUD PRINT communicate with cloud print services. We believe cloud printing has tremendous benefits for end users and for the industry and is essential, given the rapid shift toward cloud-based applications and data storage. We also believe that the only way that the benefits of cloud printing can be realized is if the protocols are open, freely implementable, and, when possible, based on existing industry standards. We expect there to be multiple cloud print services, and users should have a choice in which services they use and which printers they can connect to a service. Stay tuned for more details. We are confident that cloud-aware printers will soon be a reality.
Dept. of ISE
T.C.E. Gadag.
GOOGLE CLOUD PRINT will build proxies-in-a-box (like routers with print server abilities) so users get all the benefits of the proxy without needing to leave their PC powered on.
Dept. of ISE
T.C.E. Gadag.
CHAPTER 3
2. Choose "Options."
Dept. of ISE
T.C.E. Gadag.
3. Click the "Under the Hood" tab. Scroll to the bottom to the Google Cloud Print section and click "Sign in to Google Cloud Print."
Dept. of ISE
T.C.E. Gadag.
4. In the dialog that appears, sign in to your Google Account to enable Google Cloud Print.
5. When you have signed in, you will see this confirmation page:
Dept. of ISE
T.C.E. Gadag.
6. After setting up Google Cloud Print your options pane will look like this:
You can also print a test page to verify success. The steps you take to print will vary from application to application.
On Chrome notebooks, click the wrench icon and then select Print to print the webpage you are viewing (you can also use the keyboard shortcut Ctrl+P).
On Gmail and Google Docs for mobile, click the menu in the top right corner and select Print.
Dept. of ISE
T.C.E. Gadag.
CHAPTER 4
Dept. of ISE
10
T.C.E. Gadag.
GOOGLE CLOUD PRINT user entering a correct solution is presumed to be human. A common type of CAPTCHA requires the user to type letters or digits from a distorted image that appears on the screen. A CAPTCHA is a means of automatically generating challenges which intends to: Provide a problem easy enough for all humans to solve. Prevent standard automated software from filling out a form, unless it is specially designed to circumvent specific CAPTCHA systems. A check box in a form that reads "check this box please" is the simplest form of a CAPTCHA. This has the benefit of distinguishing humans from computers. It also creates incentive to further develop artificial intelligence of computers. CAPTCHAs are used in attempts to prevent automated software from performing actions which degrade the quality of service of a given system, whether due to abuse or resource expenditure. CAPTCHAs can be deployed to protect systems vulnerable to e-mail spam, such as the webmail services of Gmail, Hotmail, and Yahoo! Mail. CAPTCHAs are also used to minimize automated posting to blogs, forums and wikis, whether as a result of commercial promotion, or harassment and vandalism. CAPTCHAs also serve an important function in rate limiting. Automated usage of a service might be desirable until such usage is done to excess and to the detriment of human users. In such cases, administrators can use CAPTCHA to enforce automated usage policies based on given thresholds. The article rating systems used by many news web sites are another example of an online facility vulnerable to manipulation by automated software.
With programmatic authorization implemented, users can log into their Google account and grant access to their Google service data from inside application. The application then contacts Google with the login data and requests access to a specified Google service. Once Google authorizes access, your application can access the Google service data, allowing the user to create, read, update, or delete service data as needed using your application interface.
Dept. of ISE
11
T.C.E. Gadag.
This diagram illustrates the sequence: 1. When the third-party application needs to access a user's Google service, it retrieves the user's login name and password. 2. The third-party application then makes a ClientLogin call to Google's Authorization service. 3. If the Google Authorization service decides additional vetting is necessary, it returns failure response with a CAPTCHA token and challenge, in the form of a URL for a CAPTCHA image.
Dept. of ISE
12
T.C.E. Gadag.
GOOGLE CLOUD PRINT 4. If a CAPTCHA challenge is received, the third-party application displays the CAPTCHA image for the user and solicits an answer from the user. 5. If requested, the user submits an answer to the CAPTCHA challenge. 6. The third-party application makes a new ClientLogin call, this time including the CAPTCHA answer and token (received with the failure response). 7. On a successful login attempt (with or without CAPTCHA challenge), the Google Authorization service returns a token to the application. 8. The application contacts the Google service with a request for data access, referencing the token received from the Google Authorization service. 9. If the Google service recognizes the token, it supplies the requested data access.
1. Create a UI element to capture login data from the user. The UI (user interface) needs to solicit a user name (email address including domain) and password. The UI should also be capable of displaying a CAPTCHA image using the URL received from Google, if one is required, and soliciting a correct answer from the user. Ideally, your UI will include a link to Google Accounts login page
("https://www.google.com/accounts/Login") in the event that the user needs to sign up for a new account or do other account maintenance.
Dept. of ISE
13
T.C.E. Gadag.
GOOGLE CLOUD PRINT 2. Write code to generate a well-formed HTTPS POST ClientLogin request and transmit it. This code needs to contain logic to handle a CAPTCHA challenge and include both the logintoken and logincaptcha parameters. The application should also be able to detect when the user omits required information--or repeats incorrect data after a login failure-and display an error without sending a superfluous request. 3. Handle responses from Google. There are four possible responses to a login request: success (an HTTP 200) failure (an HTTP 403) with an explanatory error code invalid request, generally resulting from a malformed request failure with a CAPTCHA challenge
A success response contains an authorization token labelled "Auth". This token must be included in all subsequent requests to the Google service for this account. Authorization tokens should be closely guarded and should not be given to any other application, as they represent access to the user's account. The time limit on the token varies depending on which service issued it. A failure response includes one or more error codes and a URL with the error message that can be displayed for the user. Please note that ClientLogin does not differentiate between a failure due to an incorrect password or one due to an unrecognized user name (for example, if the user has not yet signed up for an account). Your application needs to handle all possible error messages as appropriate. A failure response with a CAPTCHA challenge means that Google has decided, for whatever reason, that additional security measures should be taken. This response is accompanied by a CAPTCHA image URL and a token representing the specific CAPTCHA challenge.
Dept. of ISE
14
T.C.E. Gadag.
GOOGLE CLOUD PRINT 4. Handle a CAPTCHA challenge from Google. To handle the challenge, the application must display the CAPTCHA image and solicit an answer from the user. To display the CAPTCHA image, use the value of Captcha Url returned with the failure response, prefixing it with the Google Accounts URL: "http://www.google.com/accounts/". Once the user provides an answer, the application should resend the login request; this time including the CAPTCHA token (logintoken) and the user's answer (logincaptcha). Google validates the user's answer before authorizing access to the account. There is an alternative for developers who do not want to manage the processes of getting and transmitting a user CAPTCHA response. In response to a CAPTCHA challenge, the application can direct the user to the Google Once hosted the user page: has
"https://www.google.com/accounts/DisplayUnlockCaptcha".
successfully responded to the challenge, the Google server trusts the computer in use. The application can then resend the original login request to obtain the authorization token.
Dept. of ISE
15
T.C.E. Gadag.
GOOGLE CLOUD PRINT ClientLogin ClientLogin can be used with any application that can make an HTTPS POST request. The POST request should be structured as a form post with the default encoding application/xwww-form-url encoded. Parameters should be included in the body of the post.
Parameter
accountType
Description Type of account to request authorization for. Possible values are: GOOGLE (get authorization for a Google account only) HOSTED (get authorization for a hosted account only) HOSTED_OR_GOOGLE (get authorization first for a hosted account; if attempt fails, get authorization for a Google account) Use HOSTED_OR_GOOGLE if you're not sure which type of account you want authorization for. If the user information matches both a hosted and a Google account, only the hosted account is authorized.
It
must
include
the
domain
(i.e.
Passwd Service
Name of the Google service you're requesting authorization for. Each service using the Authorization service is assigned a name value; for example, the name associated with Google Calendar is 'cl'. This parameter is required when accessing services based on Google Data APIs. For specific service names, refer to the service documentation. Short string identifying your application, for logging purposes. This string should take the form: "companyName-applicationName-versionID". (optional) Token representing the specific CAPTCHA challenge. Google supplies this token and the CAPTCHA image URL in a login failed response with the error code "CaptchaRequired". (optional) String entered by the user as an answer to a CAPTCHA challenge. Table 4.1 Action URL parameters
Source
Logintoken
Logincaptcha
Dept. of ISE
16
T.C.E. Gadag.
GOOGLE CLOUD PRINT ClientLogin response In response to a login request, Google returns either an HTTP 200, if login succeeded, or an HTTP 403, if login failed. A success response contains the authorization token, labelled "Auth", in the body of the response. Application must reference this token in each request to the Google service for this user. A failure response contains an error code and a URL to an error page that can be displayed to the user. If the error code is a CAPTCHA challenge, the response also includes a URL to a CAPTCHA image and a special token. Application should be able to solicit an answer from the user and then retry the login request. To display the CAPTCHA image to the user, prefix the CaptchaUrl value with "http://www.google.com/accounts/", for example:
http://www.google.com/accounts/Captcha?ctoken=HiteT4b0Bk5Xg18_AcVoP6yFkHPibe7O9EqxeiI7lUSN".
Error Code
Description The login request used a username or password that is not recognized. The account email address has not been verified. The user will need to access their Google account directly to resolve the issue before logging in using a non-Google application. The user has not agreed to terms. The user will need to access their Google account directly to resolve the issue before logging in using a non-Google application. A CAPTCHA is required. (A response with this error code will also contain an image URL and a CAPTCHA token.) The error is unknown or unspecified; the request contained invalid input or was malformed.
TermsNotAgreed
CaptchaRequired
Unknown
Dept. of ISE
17
T.C.E. Gadag.
The user account has been deleted. The user account has been disabled. The user's access to the specified service has been disabled. (The user account may still be valid.) The service is not available; try again later. Table 4.2 Error Codes
ServiceUnavailable
Dept. of ISE
18
T.C.E. Gadag.
capabilities: Dump the capabilities of the printer and print job options selected. all: Dump all the objects available for the output.
Dept. of ISE
19
T.C.E. Gadag.
Dept. of ISE
20
T.C.E. Gadag.
Here are few points which make Google Cloud Print user friendly : Google Cloud Print can print to your cloud ready printers, such as the ePrint line from HP. Google Cloud Print can also connect to your classic printers using Google Chrome for Mac or Windows. To connect your HP ePrint printer to Google Cloud Print, just submit your printer's email address. To connect your classic printer, you will need to install Google Chrome on a Mac or Windows computer that's connected to your printer. Once installed, enable the Google Cloud Print connector in Google Chrome. If your printer cant be reached at the time you submit your print job (e.g. the computer running the Google Cloud Print connector is turned off), your job will wait in the print
Dept. of ISE 21 T.C.E. Gadag.
GOOGLE CLOUD PRINT queue in the cloud. Your printer will download and print the job normally as soon as it comes back online. For your printer to be connected to the Google Cloud, you must be logged into your Windows user account. Just as when your printer is offline, if you are using the Google Chrome proxy and your Windows user account is logged off, jobs will be saved and fetched normally when you log back in. If you delete your printer by mistake or change your mind later, you can re-connect all the printers on your local device by signing back into Google Cloud Print. Google Cloud Print jobs are submitted and retrieved over https, and are available only to you and to the printer you submitted the job to. If documents are not printing: Make sure your Google Cloud Print connector is running on a computer with Mac or Windows (Linux support coming soon!). If you are using Windows XP , make sure you have the Microsoft XML paper specification pack installed. Confirm that the computer connected to your printer is powered on and that you are logged in. It keeps copies of all the documents but only for so long as the printing job is active and not complete. We have to do this to make sure your document gets printed. Once the job is complete, the document is deleted from our servers. Google keeps information about the print job in question (the job title, the printer you sent it to, printer status information) as a record, along with your Google Account ID. We need this information in order to process the jobs you send for printing, and to allow you to view and edit your printing history through the Cloud Print dashboard. Documents you send to print are your personal information and are kept strictly confidential. Google does not access the documents you print for any purpose other than to improve printing. You can see and edit these records through the Cloud Print dashboard at any time.
Dept. of ISE
22
T.C.E. Gadag.
CHAPTER 5
Service Interfaces
Google Cloud Print service interfaces are used by a cloud print proxy. This proxy is a piece of software that enables any printer to register itself with Google Cloud Print, that runs on a computer connected to a non-cloud-aware printer a web service for printing. Once the printer is registered with the service, it can then receive jobs from and communicate status with Google Cloud Print. Use of Google Cloud Print enables platform- and format-independent printing. The proxy needs to authenticate the user's Google Account to communicate with Google Cloud Print for adding printers and getting the print jobs. This is done by using Clientlogin API.
Dept. of ISE
23
T.C.E. Gadag.
GOOGLE CLOUD PRINT Capabilities: Printer capabilities (XPS or PPD) Defaults: Printer default settings (XPS or PPD). Status: Status string of the printere.g., Out of Paper, Online, etc. Description: Descriptive string about the printer. capsHash: A hash or digest value of the capabilities data. This value is useful, for example, to compare values and check whether the local printer's capabilities have changed.
/Update
This interface enables the proxy to update various attributes and parameters of the printer registered with Google Cloud Print.
Dept. of ISE
24
T.C.E. Gadag.
GOOGLE CLOUD PRINT Parameters Printerid: Unique printer identification (generated by Google Cloud Print). Printer: User readable name of the printer being registered (need not be unique). Proxy: Identification of the printer client or proxy (must be unique). Capabilities: Printer capabilities (XPS or PPD). Defaults: Printer default settings (XPS or PPD). Status: Status string of the printere.g., Out of Paper, Online, etc. Description: Descriptive string about the printer. capsHash: A hash
/Delete
This interface enables the proxy to delete a printer from Google Cloud Print. Parameters Printerid: Unique printer identification (generated by Google Cloud Print).
/List
This interface provides a listing of all the printers for the given user. It can be used by the proxy to compare the printers registered and available locally. If the proxy is connected to multiple printers, this interface is useful to keep the local printers and printers registered with Google Cloud Print in sync. With this interface, the proxy does not need to maintain a state or mapping of the local printers and needs to store only the unique proxy ID required as a parameter. Parameters Proxy: Identification of the proxy, as submitted while registering the printer.
Dept. of ISE
25
T.C.E. Gadag.
Fetch
This interface is used by the proxy to fetch the next available job for the specified printer. Parameters Printerid: Unique printer identification (generated by Google Cloud Print).
Dept. of ISE
26
T.C.E. Gadag.
Control
Parameters Jobid: Unique job identification (generated by server). Status: Status of the job, which can be one of the following:
QUEUED: Job just added and has not yet been downloaded. SPOOLED: Job downloaded and has been added to the client-side native printer queue.
DONE: Job printed successfully. ERROR: Job cannot be printed due to an error.
Code: Error code string or integer (as returned by the printer or OS) if the status is ERROR. Message: Error message string (as returned by the printer or OS) if the status is ERROR The following diagram shows the transitions between the four job status states:
Dept. of ISE
27
T.C.E. Gadag.
CHAPTER 6
ADVANTAGES
Google associate printers with a Google account and manage them the same way as you manage Google Docs documents, so you can share them with other people. Web applications can use APIs to customize the printing options and change the user interface displayed when you start printing a document. "It is believed cloud printing has tremendous benefits for end users and for the industry and is essential, given the rapid shift toward cloud-based applications and data storage. We also believe that the only way that the benefits of cloud printing can be realized is if the protocols are open, freely implementable, and, when possible, based on existing industry standards. We expect there to be multiple cloud print services, and users should have a choice in which services they use and which printers they can connect to a service ". Google Cloud Print makes the mobile printing experience easier for users. Configuring Chrome, adding printers and printing are simple, despite a few reports of failed print jobs. Google Cloud Print is printer-manufacturer-neutral: users can send a job to any printing device that has been added to the service through Chrome.
Access to printers anywhere anytime. Works with all types of devices No need of driver software. No need of any network configuration. Any type of document can be printed. Saves time and cost
Dept. of ISE
28
T.C.E. Gadag.
CHAPTER 7
LIMITATIONS
However, this beta release has several limitations that will constrain adoption until they are addressed:
Users can only print e-mails and attachments from mobile Gmail, and documents from mobile Google Docs. Google told Gartner that future releases will integrate with more Google services, and offer APIs to connect to third-party products.
Consumers will need to keep their PCs switched on for jobs to print, because their PCs will be hosting the cloud connector. For enterprise users, the connector can be deployed on the print server.
Cloud Print works via the latest beta of Google Chrome Windows and Macintosh only. Google says it will support other operating systems at some point in the future, but gave no timeline.
Cloud Print does not use location-based technology to identify available printers, limiting its usefulness when the user is "out and about" and seeking a nearby printer.
The tokens returned by ClientLogin expire every 28 days and require reauthentication. Still research is going to overcome this.
Dept. of ISE
29
T.C.E. Gadag.
CHAPTER 8
CONCLUSION
While its still very early in the life of Google Cloud Print, so far it shows some promise. The biggest thing going for it so far is that its very easy to setup. The whole process from setup to print took us no more than a few minutes. One of the things going against it however, is its lack of ubiquity. The fact that you have to use Chrome will be a problem for the 90% of Internet users who use something else other than Chrome. If other browsers like IE or Firefox adopted this, then a lot more users would be able to get in on the action. Additionally, its nice that its out for Windows PC users, but Linux users are currently being left out. That said, its great to see Google tackling this problem. As mobile phone use continues to grow and as more and more tablets start to be released into the wild, its nice to know there is an option out there to print your documents from your mobile device without having to spend money on a new printer. It may seem that Google's solution is complicated and difficult to implement: we need an open standard for cloud printing, cloud-aware printers and users need to associate printers with an online service. Instead of sending the printing job directly to the printer, you'll send it to the online service, which forwards it to the printer. Despite all these hurdles, Google Cloud Print allows you to print documents from a mobile phone, tablet, notebook or any other mobile device. You'll be able to print files from an Android phone or tablet, from a Chrome OS computer, from any computer that runs Google Chrome and from other devices that will support Google Cloud Print.
Dept. of ISE
30
T.C.E. Gadag.
CHAPTER 9
REFERENCES
Dept. of ISE
31
T.C.E. Gadag.