从Chrome浏览器中的Web应用程序访问客户端打印机 [英] Accessing a client machine printer from a Web application in Chrome Browser

查看:837
本文介绍了从Chrome浏览器中的Web应用程序访问客户端打印机的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要访问从我的Web应用程序连接到客户端计算机的打印机.技术:MVC3,语言:C#.
我们有必须在创建帐单时直接打印的帐单.它是使用Crystal Report创建的.我知道访问客户端打印机的安全性受到威胁.但是我们在IE中使用ActiveX做到了这一点.问题出在Chrome浏览器上.它不支持它.
是否有人有任何解决方案或任何其他建议..或是否有任何方法可以从Chrome浏览器打开IE浏览器弹出窗口(我们使用了很多IE不支持的jQuery.因此,我们将Chrome设置为默认浏览器.)以便我们可以使用IE中的ActiveX.

任何人都可以帮助我..请...急..谢谢..

I need to Access a printer which is connected to the client computer from my web application. Technology :MVC3, language: C#.
We have bills which has to be printed directly while creating it. It is created using crystal report. I know it''s against security to access a client side printer. But we did that in IE using an ActiveX. The problem is with the Chrome Browser. It is not supporting it.
Do any one have any solutions or any other suggestions.. or Is there any way to open IE browser popup window from a Chrome Browser(We are using a lot of jQuery which is not supported with IE.So we set Chrome as our default browser.)so that we can use that ActiveX from IE.

Can any one help me..please...it''s urgent.. Thank you..

推荐答案

只需打开一个弹出式窗口,其中包含需要就像Sebastian T Xavier所说的那样,只需执行javascipt windows.print().

您也可以使用IETab.
http://www.ietab.net/ [ ^ ]

我不知道它是否支持每个站点的Activex,但是如果不支持,甚至不去那里!
http://msdn.microsoft.com/en-us/library/dd433050%28v = vs.85%29.aspx [ ^ ]

正如您已经提到的那样,这是一种安全隐患,是一场等待发生的事故.即使与安全性无关,它仍将为此类修补程序提供持续支持,这些修补程序随时可能会中断.

祝你好运!
Simply open a popup with the content that needs to be printed, and like Sebastian T Xavier said, just do a javascipt windows.print().

You could also use IETab.
http://www.ietab.net/[^]

I have no idea if it supports per-site activex, but if it doesn''t... don''t even go there!
http://msdn.microsoft.com/en-us/library/dd433050%28v=vs.85%29.aspx[^]

As you already mentioned it is a security hazard and an accident waiting to happen. Even if it isn''t about security it will be about providing constant support for this kind of patches that can break at any time.

Good luck!


这篇关于从Chrome浏览器中的Web应用程序访问客户端打印机的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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