在asp.net或JavaScript更改默认的打印机,这可能吗? [英] Changing default printer in asp.net or javascript, is this possible?

查看:164
本文介绍了在asp.net或JavaScript更改默认的打印机,这可能吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可能重复:结果
  <一href=\"http://stackoverflow.com/questions/206880/printing-to-a-specific-printer-from-a-web-app\">Printing从Web应用程序特定打印机

我做了一个程序,它的要求是打印文档,请告诉我,这是可能的,我可以改变在asp.net或JavaScript客户端的默认打印机,这是可能改变打印机的纸盒还有,因为我可以看到这是可能的小程序,做什么,在.NET进行。
我希望当默认打印机被改变,我将它保存在数据库中,每当该页面将被打开,机器会自动选择默认打印机到选定的项目。那么,有没有为它所需的所有库。

I have made a program, and its requirement is to print documents, please tell me is this possible that i can change the default printer on client side in asp.net or javascript, and is this possible to change the trays of printer as well, as i can see this is possible in applet, what to do in .net. I want when default printer is changed, i will save it in database, and whenever that page will be opened, it will automaticaly select the default printer to that selected item. So is there any library required for it.

推荐答案

否,这是不可能的。试想想通过通过网站操纵打印机或打印机设置的能力能够被恶意利用的所有方式。

No, this is not possible. Try to think through all the ways that the ability to manipulate a printer or printer settings via a web site could be used maliciously.

除非你使用的ActiveX控件,或者类似的东西,你甚至无法打印照片,无需事先提示用户(他们将能够手动更改他们的打印机)。

Unless you're using an ActiveX control, or something like it, you can't even print without prompting the user first (where they would be able to change their printer manually).

这篇关于在asp.net或JavaScript更改默认的打印机,这可能吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆