在Firefox中打印PDF iframe

是的,我已经看到了关于这个的其他问题,但他们没有帮助我,所以这是代码

$("#raspe4atat_item_id ?>").click(function(){ //alert(555); $.ajax({ url: "/raspe4atat/item_id ?>", type: "GET", success: function(){ $.ajax({ url: "/iframe/item_id ?>", type: "GET", success: function(r){ $("#not_enough_money_item_id ?>").append(r); setTimeout(function(){ document.getElementById('pdf_item_id ?>').contentWindow.print(); //window.frames['iframe_item_id ?>'].print(); }, 1000); } }) }}) return false; }) 

这是iframe:

 <iframe name="iframe_item_id ?>" style="position: absolute; top: -1000px;" id="pdf_item_id ?>" src="user_id.'.pdf' ?>" width="0" height="0">  

此代码适用于谷歌浏览器,但在Firefox中它没有。

首先它在服务器中创建pdf,然后它在页面中生成,然后它等待1秒然后打印它,但它不在Firefox中工作,如果我取消注释行,然后firefox询问我是否要停止更多对话窗口? 你能帮助我吗?