简体   繁体   English

使用JavaScript在弹出窗口中打印PDF

[英]Print PDF in a Popup with Javascript

I would like to print a PDF in an Popup window in Firefox 30 with Javascript. 我想在带有Javascript的Firefox 30中的“弹出”窗口中打印PDF。

When I looked at on firebug, I received this message " Error: Permission denied to access property 'print' " 当我查看Firebug时,收到此消息“ 错误:拒绝访问属性'print'的权限

Is there a workaround ? 有解决方法吗?

Here my simple code : 这是我的简单代码:

var myWin = open("my-pdf.pdf"); var myWin = open(“ my-pdf.pdf”);
frames["myWin"].focus(); frame [“ myWin”]。focus();
frames["myWin"].print(); frame [“ myWin”]。print();

I encountered this bug; 我遇到了这个错误; Updating compatability.js and this started working for me. 更新compatability.js,这开始为我工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM