-
Create a service API account at https://console.developers.google.com: Go to "Credentials", click "Create credentials" and select "Service account key".
-
Generate a P12 key based on the service account you just made and export it. Place this file in your project folder and ensure the file properties are set to "Content" and "Copy if newer".
-
Go to https://console.developers.google.com/iam-admin/serviceaccounts/ and save the "Service account ID" (email address) that was generated for your service account. You need to share your printer with this email address in order for the service account to be able to print to your printer.
-
Go to https://www.google.com/cloudprint/#printers and click "Details" for your printer. Save the guid you see under "Advanced Details" > "Printer ID" and Access Token.
-
Now let's test if it works. Use the following syntax to connect to cloud print (The "source" parameter is just a name for your application, for example "io7-googlecloudprint"):
var service = new GoogleCloudPrintService(accessToken: "{access_token_provided_by_server}"); var printerCollection = service.GetPrinters(); foreach (var printer in printerCollection.printers) { Console.WriteLine(printer.name); }
-
Notifications
You must be signed in to change notification settings - Fork 1
Ziack/CloudPrinter
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published