Then to make it smart, you can have your webapp work in both environments, running in the desktop app, or directly in a browser. Using this technique, you can write code that can actually enumerate printers on the network and talk to hardware while still running your webapp and you can expose new JS api's you build in the desktop app to your web application. Like Chromely (kind of like Electron, but lighter), EdgeSharp or CEFSharp etc. A better solution to just giving clients a webappp to run might be to wrap your webapp with a desktop application using Chromium Embedded Framework. ![]() If you're doing this for a product or webapp that will run in an environment where there are printers etc. Maybe they help you in solving your problem. I hope for you someone comes up with a better solution, but I wanted to at least share my thoughts. Maintainability is absolutely not optimal since you need to maintain the printer switch program and the webservice.You need to made extra calls for the switch between printers There is a lot of overhead in this solution.So somehow you should time how long a common job takes. If printer one is printing a document you can not switch to printer two, since this will disable printer one.If this is working you can use Javascript calls to first print to printer one and after the switch to printer two. page which is able to call the printer enable/disable program. Now make for example a PHP, asp.net or ruby etc. If on Linux there should be a command line interface for printer management (I don't know for sure). Maybe an application which is capable of disabling and enabling a printer. Therefore my probably complicated solution:Ĭreate a command line application which can switch the default printer of the operating system. ![]() I have searched for an answer but it looks like there is no way to set a printer programatically.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |