Last post Feb 13, 2017 01:28 PM by wavemaster
Feb 09, 2017 08:34 PM|bigshorty01|LINK
I want to offer the ability to print to a Google Cloud Print connected printer.
I tried implementing, but due to my limited skills and abolutly NO good examples (At least all my searches resulted in no good example), I failed.
Has anybody done that already and wants to share his code?
I am already failing in the oAuth2 authentication.
Can you please assist?
Feb 10, 2017 06:16 AM|Chris Zhao|LINK
#Printer Sharing API
A simulate page containing HTML forms which provide a convenient way to make requests to the various service interfaces for testing and debugging purposes.
#A .NET wrapper for Google Cloud Print API
#APIs & .NET Libraries
Feb 10, 2017 08:53 AM|bigshorty01|LINK
Thanks, but I did find these pages. However, I was not able to implement it. I am searching for a working code example.
I am not a trained developer. Everything I know I thought myself and this exceeds my capabilites.
Feb 10, 2017 12:38 PM|wavemaster|LINK
I have implemented printing from my web app by creating a pdf file on the fly using iTextSharp and then let the device's OS handle the printing.
Works pretty well.
www.mikesdotnetting.com and search there for itextsharp
Feb 10, 2017 01:25 PM|bigshorty01|LINK
that is what is currently done on the page.
But Sending that PDF to Google Cloud Print to be able to print that on a remote printer from everywhere is what I want to achive.
Feb 10, 2017 02:41 PM|wavemaster|LINK
A user would have the app installed on their device, right?
Feb 10, 2017 03:25 PM|bigshorty01|LINK
Whatt App? I am talking about a page. And the printer should not be connected to the PC the user is on.
Feb 10, 2017 03:33 PM|wavemaster|LINK
or google "how to printer to google cloud printer from windows"
Feb 10, 2017 03:50 PM|bigshorty01|LINK
Actually I think you do not understand what I try to do.
I do not want the user to install something. He should be able to press print on the webpage and the website is configured to print on a specified printer without any further user interaction (except for setting up the GCP printer once). After that it should
not matter which PC they are using!
Feb 10, 2017 04:28 PM|wavemaster|LINK
Consider my suggested solution an alternative to what you are trying to do.
There is a caveat where it looks like GCP will want the document your are printing to be available online.
Feb 13, 2017 10:49 AM|bigshorty01|LINK
This basically works, but since the PDFs are created on demand in codebehind I might have to think about something. I cannot create these docs just in case on every post back...
Feb 13, 2017 12:46 PM|bigshorty01|LINK
I have managed to work around the problem, by opening a new tab with the file name as query string. It works so far.
But I now I want to close the new tab once the print dialog has been closed.
I tried setOnCloseCallback of the gadget but this fires right after it was set and not after the dialog closes.
Any other idea?
Feb 13, 2017 01:28 PM|wavemaster|LINK
Running up against the limitations of browsers.