javascriptjsppdfpdfobject

Embedded pdfobject not displayed while switching tabs


We are using pdfobject to embed the pdf to the browser. We have multiple tabs in the web application.

Issue :

  1. Open the pdf in one tab
  2. Keep the focus on the pdf form.
  3. Switch to some other tab.
  4. Come back to same tab again
  5. Now the pdf disappears.

Code:

<script type='text/javascript'>
  function embedPDF(){
    var myPDF = new PDFObject({ 
      url: '<%=formURL%>' 
    }).embed(); 
  }
  window.onload = embedPDF;
</script>

Any help on this?


Solution

  • The issue is fixed by upgrading ExtJS to version 4.0 and above. Its a known bug in ExtJS 3. Also pls not this is not working only in IE and working well in Firefox and chrome.