Printers = 8.GetString(Convert.FromBase64String(printers)) If (!string.IsNullOrEmpty(printers) & printers.Length > 0) so store this info with the specified session ID WCPP Utility is sending the installed printers at client side _Memor圜ache.Set(sessionID + "wcppInstalled", wcppVersion) Įlse if (prType = RequestType.ClientSetInstalledPrinters) also store the WCPP Version if available so store the session ID indicating it has the WCPP installed This request is a ping from the WCPP utility Return File(script, "application/x-javascript", "WebClientPrintScript") Įlse if (prType = RequestType.ClientSetWcppVersion) Let WebClientPrint to generate the requested scriptīyte script = WebClientPrint.GenerateScript(Url.Action("ProcessRequest", "WebClientPrintAPI", null, ), queryString) PrType = RequestType.GenWcppDetectScript) If (prType = RequestType.GenPrintScript || RequestType prType = WebClientPrint.GetProcessRequestType(queryString) Public WebClientPrintAPIController(IMemor圜ache memCache) Private readonly IMemor圜ache _Memor圜ache For instance, you could use a Distributed Cache instead! BUT you can change it based on your dev needs!!! the list of printers and they have the WCPP client utility installed We're going to use Memor圜ache to store users related staff like Public class WebClientPrintAPIController : Controller NET Core, MVC/C#, MVC/VB, SPA/AngularJS+WebAPI, WebForms/CS or WebForms/VB:Ĭreate a new Controller and name it WebClientPrintAPIController and then copy/paste the following code:
WebClientPrint Processor 6.0 for Windows, Linux, Raspberry Pi & Mac WebClientPrint 6.0 for ASP.NET (or greater)
Best of, this solution works with any browser on Windows OS like IE (6 or later), Chrome, Firefox, Opera & Safari as well as on Linux, Raspberry Pi & Mac OS clients! Requirements Development/Server-side
In this walkthrough, you'll learn how to print multiple files or documents (like MS Word *.doc or *.docx MS Excel *.xls or *.xlsx Adobe PDF Text files or images) from an ASP.NET website to different printers installed at the client machine without displaying any print dialog. The great thing about this is that you can print those files without displaying any print dialog to the user i.e. The new PrintFileGroup feature of WebClientPrint for ASP.NET will allow you to get that working by just writing a few lines of code. Both Printer1 & Printer2 are available at the client machine.
Let's say you want to print an "Invoice" to Printer1 and a "Dispatch Form" to Printer2. Suppose you have an ASP.NET website and you need to print two different documents or reports to two different printers installed at the client machine. Product WebClientPrint for ASP.NET Published Updated Author Neodynamic How to print multiple files to client printers from ASP.NET