Dec 23, 2013, 8:51 AM
Print window content in EXT 4.2.1
Hello guys!
I'm trying to print the content of a ext window. In the window i have an iframe with a pdf.
I'm able to print the content on google chrome, but on IE the best i can get is the content of the parent window.
I send you my function.
I'm trying to print the content of a ext window. In the window i have an iframe with a pdf.
I'm able to print the content on google chrome, but on IE the best i can get is the content of the parent window.
I send you my function.
clickRunReport:function(){
console.log("clickRunReport");
//report request
var request = frontController + 'report/test?'
+ "p_cod_opcao=873&p_cod_rep=873&p_cod_mod=INT&p_dta _inicial=12/12/2013&p_dta_final=12/12/2013&p_cod_dest=&p_cod_esp=&p_tipo_serv=F";
//destroy window
//Ext.WindowManager.each(function(cmp) { if (cmp.itemId === 'reportWindow') cmp.destroy(); });
//ext window with hidden iframe
var win = new Ext.Window ({
itemId: 'reportWindow',
width: 800,
height: 600,
title: 'Relatorio',
hidden:true,
modal:true,
html: '<iframe src="'+request+'" id="reportFrame" id="reportFrame" name="reportFrame" style="visibility:hidden;display:none" ></iframe>'
});
win.show();
//print works on CHROME
window.frames['reportFrame'].focus();
window.frames['reportFrame'].print();
}
Thank you for the attention hope you can help me!
Last edited by Daniil; Dec 23, 2013 at 11:06 AM.
Reason: Please use [CODE] tags