【问题标题】:How to print directly in IE 11 with ActiveX如何使用 ActiveX 在 IE 11 中直接打印
【发布时间】:2016-12-22 11:07:03
【问题描述】:

在页面上,我在 iframe 中显示了一个 pdf 文档,我尝试直接打印它。在我的搜索结束时,出于安全等原因,这种情况适用于 IE 11,但我该怎么做?我不知道。请救救我:/

我使用这些 DOM 元素和函数

<button type="button" onclick="printDoc()" class="btn success">Print It</button>

<script type="text/javascript">  
                        function printDoc() {
                           $(document).ready(function () {
                         document.getElementById("myDiv").contentWindow.print({
                                    bUI: false, bSilent: true,
                                    bShrinkToFit: true
                                });
                           });
                       };
</script>

【问题讨论】:

标签: javascript internet-explorer iframe printing activex


【解决方案1】:

ActiveX 控件在 IE11 上不起作用,因为 Microsoft 不再允许 ActiveX 插件在其浏览器空间中运行。但是,如果您使用 54 位操作系统,您可以尝试通过添加注册表来强制 IE 在 32 位模式下运行键如下所示 -

在此处更改注册表项:

HKEY_CURRENT_USER\软件\微软\互联网 Explorer\Main\TabProcGrowth 或 HKEY_LOCAL_MACHINE\软件\微软\互联网 Explorer\Main\TabProcGrowth

将其设置为大于 0 的值并重新启动 IE11

【讨论】:

  • 那么IE8和IE9的条件一样吗?
  • 在 IE8 和 IE9 上,您可以尝试使用此链接启用 ActiveX - manageengine.com/products/desktop-central/…
  • 感谢您的分享:)
  • 您到底想做什么,在 IE11 或 IE8 或 IE9 中打印?这个答案对你有用吗?
  • 其实版本对我来说并不重要。只有我应该打印它。现在我使用 ie9,但如果您设置了 ie 兼容性设置,则启用 Activex。我尝试了这个,但仍然显示对话框。 stackoverflow.com/a/15228701/4582992
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2018-11-14
  • 1970-01-01
  • 2016-02-17
  • 2012-12-08
  • 1970-01-01
  • 2015-12-27
  • 1970-01-01
相关资源
最近更新 更多