1 Reply Latest reply on Dec 28, 2015 12:44 PM by gkaiseril

    File load completed


      I am creating new object by

      new ActiveXObject("AcroPDF.PDF");

      Then I am setting attributes of file I want to print

      var embed = document.createElement("embed");

      embed.setAttribute("id", "pdfContent");

      embed.setAttribute("type", "application/pdf");

      embed.setAttribute("src", pdfUrl); // pdfURL - path to file

      and then call this function to print document

      printDocument(embed, callback);

      var printDocument = function(embed, callback) {

           if (typeof embed.print === typeof undefined) {

                setTimeout(function () {

                     printDocument(embed, callback);            

                }, 1000);        

           } else {            





      The problem is that if file isn't loaded yet, print function is not called.

      How can I track the moment when my .pdf file is fully loaded?

      I am using IE 11 for now.