title: Javascript Printing Issue (IE | Iframes | PDF)
body: <p>Currently - I have a View that populates an Iframe with a PDF, and I am attempting to print the contents of the Iframe (the PDF) using Javascript.</p>
  
  <p>Everything seems to be working as it should in nearly every browser with the exception of IE. I have tried several different methods and you can see my current one below:</p>
  
  <p><strong>Print View:</strong></p>
  
  <pre><code>&lt;script type='text/javascript'&gt;
  $(document).ready(function (){
      //Grabs the Iframe   
      var ifr = document.getElementById("PDF");
  
      //PDF is completely loaded. (.load() wasn't working properly with PDFs)
      ifr.onreadystatechange = function () { 
          if (ifr.readyState == 'complete'){ 
              ifr.contentWindow.focus(); 
              ifr.contentWindow.print(); 
          } 
      }
  });
  &lt;/script&gt;
  
  &lt;html&gt;
      &lt;body style='margin: 0; overflow: hidden;'&gt;
         &lt;iframe src='URL' width="100%" height="100%" id="PDF" name="PDF"&gt;&lt;/iframe&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>The above appears to work in IE, as it launches a print dialog box once the PDF has been loaded, however upon selecting a printing option, nothing happens.</p>
  
  <p>The same result happens in Chrome and Firefox (print dialog etc.) however, the PDF is actually printed.</p>