Reputation: 2542
I was asked if it is possible to develop a JS solution where I access a network printer through the client. so, let's say I have a webservice which is available to certain customers and it provides the function to print a report (or something similar) to a user defined network printer (the user tells what domain and printername to print on)...
is this possible in any way? the best solution would be if it could be done through something like an Ajax request ;)
Upvotes: 0
Views: 3516
Reputation: 1076
This is possible, but probably not in the way you want. Your best bet is to use server-side scripting to print to the printer. The problem is, modern web-browsers have lots of security features that don't allow things like this.
The only way I can think of to get around this is by using a printer that:
1) Accepts HTTP or FTP uploaded print jobs.
2) Is in the some DNS domain as the website so the anti-cross site scripting protections on the browser don't stop you.
Again though, you'd be much better off with some sort of server-side solution, or maybe writing a program or custom plugin to run on the client.
Upvotes: 1