karlwancl / GoogleCloudPrintApi

A .NET wrapper for Google Cloud Print API, based on .NET standard 1.4
MIT License
12 stars 14 forks source link

Producing printed output #22

Closed awerber closed 6 years ago

awerber commented 7 years ago

Karl,

In your latest email to me you said: "The lib does not automatically redirect your printed job to your target printer. The proper way is to call the download interface, pull the job from Google cloud to the local server, and redirect the downloaded content to the printer through calling the print program (maybe a PDF viewer that takes doc as an arg for printing)"

I've tried using your sample application to print something. The most promising way was to choose Submit Job. I select the printer registered using your Register code and selected a plain text file on my machine. I changed the values of the print ticket to match what I think is compatible with the printer. When I run Submit Job, it looks like a job gets created, and the method returns Success = true, but nothing prints. From what you said above, it sounds like the best I can do with the code is to create the print job, but I would need to invoke some other program to actually get the printer to print.

The ultimate goal I'm trying to achieve is to get non Cloud Ready printers registered so that I can put a button on a web application that allows a user to select a printer and get a document printed. It looks like I can get this accomplished, but the registration process is kind of complicated (the code for registering is at [https://github.com/google/cloud-print-connector]).

Again, I would appreciate your guidance.

karlwancl commented 7 years ago

Hmm. I wonder if Google Cloud Print is even needed in this case.

If your ultimate goal is to provide a web interface for user to print their document, why not just accept document upload from client to your server, and your server prints the document to the connected non-cloud printer, it's way easier to deal with unless you want Google Cloud Print capability to your print system.

awerber commented 7 years ago

Thanks again for commenting on my question. I'm not sure how our network is set up. I think the reason my supervisor want the cloud printing is that we may have people in an office in one city trying to print on a printer in another city, for example, a San Diego employee would need to print to a printer in the San Francisco office.

But, I'm still wondering about whether a printer just registered using your code can produce actual printed output, not just create a print job that has to be printed using a program.

karlwancl commented 6 years ago

@awerber The API only deals with collecting print jobs from clients & give access to server-side to download the print jobs. There's nothing the API could do with directly print the print jobs to a non-cloud printer magically.

awerber commented 6 years ago

Thank you for clarifying this. I just wanted to make sure because there is another project on GitHub, using a service account, that allows a printer to print using a service account if the printer is connected.