google-cloud-print

Customize google cloud print button function

此生再无相见时 提交于 2019-12-11 09:06:38
问题 Currently i am using the google cloudprint button for my site <script src="//www.google.com/cloudprint/client/cpgadget.js"></script> <script defer="defer"> var gadget = new cloudprint.Gadget(); gadget.setPrintButton(document.getElementById("custom_print_button")); gadget.setPrintDocument("url", "Cloud Print test page", "http://www.google.com/cloudprint/learn/"); </script> I want to send an email when I hit the print button, is this possible? 回答1: No problem at all... just attach an onclick

Is it possible to connect thermal receipt printer to Google Open print?

大城市里の小女人 提交于 2019-12-11 02:29:32
问题 I am looking at connecting a thermal receipt printer to Google Open Print, is this possible? and if so are you aware of any thermal printers that I can purchase? The reason for the above is that I have a takeaway shop with an online store. When an order is placed the order then gets printed on an A4 Injet printer. This is wasting me lots of paper and ink, Ideally I'd like it do be done with a thermal printer. I know the website can work with this I just need to make sure I can get a thermal

How to print Android activity display using cloud print

浪尽此生 提交于 2019-12-11 02:06:37
问题 I am trying to implement Google Cloud Print into an app, following the Integration Guide. I'm trying to keep it basic by just printing out google.com. When clicking the print button I created, it brings up the dialog, but I am getting a FileNotFoundException stating java.io.FileNotFoundException: No content provider: http://www.google.com If I then select a printer and click print, the dialog gives me a "Document Missing" message, which makes sense based on the FileNotFoundException. I took

Google Cloud Print: How long is the token good for (to submit jobs to cloud print)?

梦想与她 提交于 2019-12-10 19:53:39
问题 If my user uses oauth v2 to cloud print to get a credential, how do I get a credential that is good for at least 48 hours? We need to be able to get access to the printer, and keep it for some days. (Conceivably we could require the user to re auth to google once or twice a week, but certainly not more.) If google cloud print can't do this, what system can? (Require cross platform printing, from cloud to win, osx and linux, also require ability to do raw printing to local printer, not just

Google Cloud Print API: User credentials required

我是研究僧i 提交于 2019-12-10 09:43:05
问题 I'm trying to use the Google Cloud Print library to get a list of the cloud printers available to the users, but when I do a request I get an error: "User credentials required" This is how I send the request: var request = require('request'); var options = { url: 'https://www.google.com/cloudprint/search', headers: { 'X-CloudPrint-Proxy': 'APP_NAME', 'Authorization': 'GoogleLogin auth=ACCESS_TOKEN_HERE' } }; function callback(err, response, body) { console.log(err); console.log(response);

Print Intent for Google Cloud Print App

我怕爱的太早我们不能终老 提交于 2019-12-09 18:45:48
问题 As of today, the official Cloud Print documentation from Google still tells you to include the PrintDialogActivity into your app to print documents using Google Cloud Print. However, it's now also possible to print using the official Google Cloud Print app. I couldn't find any documentation for that though. 回答1: The answer is pretty straightforward, but it still took me a few days to figure it out: Intent printIntent = new Intent(Intent.ACTION_SEND); printIntent.setType("text/html");

OAuth2 with Google Cloud Print

二次信任 提交于 2019-12-08 02:08:15
问题 I had written a Google Apps Script that connected to Google Cloud Print to automate some printing. The script would auto-run on a time interval, search for relevant files, and if found it would sent them to my printer. My code used OAuthConfig and was working fine , but now that class has been deprecated and after a weekend of trial & error and scouring the interwebs I can't get it to work with OAuth2 . Here's the OAuthConfig code that was working fine : function printDoc(docId, docTitle,

Any Cloud Print API For ANDROID

眉间皱痕 提交于 2019-12-06 10:38:12
问题 Does anyone know if there is a Cloud print API for Android? .To develop our own Cloud print Apk for Android device. Any tutorial or Sample code for this will be helpful 回答1: There is an Google Cloud Print API available which I wrote a while back: http://cloudx.fun2code.de/en/api.html JavaDoc and examples are also available. For a more detailed example have a look at the blog entry: http://fun2code-blog.blogspot.de/2011/10/setting-up-cloud-print-printer-using.html Hope that helps... 回答2: Check

Google cloud print get access token

十年热恋 提交于 2019-12-05 21:35:33
问题 I want to call /search method of Google cloud print from my webServer. I am using OAuth web server guide obtaining a refresh_token/access_token to use with scopes: https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile Then I am calling search Api but I am obtaining a 403 forbidden. Request DefaultHttpRequest(chunked: false) POST /cloudprint/search HTTP/1.1 Host: www.google.com Content-Type: text/plain; charset=utf-8 Authorization: OAuth yb29.1.AADtN

Google Cloud Print API: User credentials required

前提是你 提交于 2019-12-05 18:56:12
I'm trying to use the Google Cloud Print library to get a list of the cloud printers available to the users, but when I do a request I get an error: "User credentials required" This is how I send the request: var request = require('request'); var options = { url: 'https://www.google.com/cloudprint/search', headers: { 'X-CloudPrint-Proxy': 'APP_NAME', 'Authorization': 'GoogleLogin auth=ACCESS_TOKEN_HERE' } }; function callback(err, response, body) { console.log(err); console.log(response); console.log(body); } request(options, callback); In order to make this work (as there is no exact