Print window content in EXT 4.2.1

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    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.

    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

Similar Threads

  1. [CLOSED] Print window content
    By avante in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: Jan 17, 2014, 6:32 PM
  2. [CLOSED] How I print ext:Window content?
    By supera in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Feb 29, 2012, 4:00 PM
  3. Replies: 6
    Last Post: Feb 18, 2011, 2:12 PM
  4. Print content inside a panel
    By Nagaraj K Hebbar in forum 1.x Help
    Replies: 0
    Last Post: May 19, 2009, 2:14 AM

Tags for this Thread

Posting Permissions