如何使用 ActiveX 在 IE 11 中直接打印

How to print directly in IE 11 with ActiveX

在页面上,我在 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>

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

在此处更改注册表项:

HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\TabProcGrowth or HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer\Main\TabProcGrowth

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