I want to get the list of network printers through silverlight. I have seen a few examples of using WMI, but they are not available in Silverlight, so, I was wondering if there are any alternatives to find network printers through silverlight or at least the installed printers…
There is also a question posted here
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
In Silverlight 5, you can use EnumPrinters Win32 API call through PInvoke. The code is pretty long, so I put together a sample that shows how to enumerate the printers on the machine.
http://10rem.net/blog/2011/09/27/enumerating-printers-using-pinvoke-in-silverlight-5
With Silverlight 4, you’re out of luck.
Method 2
Its my understanding that you cannot do this. You don’t have the control over this, it is simply handed off for its built in support. This is the same reason why you can’t specify a printer – it just doesn’t allow this.
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0