title: Printing a html object
body: <p>I had read all I could find about this But I am still not able to solve this.</p>
  
  <pre><code>&lt;body&gt;
  &lt;object data="/app/pdf/banana.pdf" type="application/pdf" 
  style="width: 100%; height: 100%"&gt;&lt;/object&gt;
  &lt;/body&gt;
  
  
  
  &lt;script type="text/javascript"&gt;
  
  $(document).ready(function () {
      window.print();
      setTimeout("closePrintView()", 3000);
  });
  function closePrintView() {
      document.location.href = 'somewhere.html';
  }
  </code></pre>
  
  <p>Everything is working, Even the redirect when I close the print dialog but the problem is that the print function loads an empty page, I cant see the PDF.</p>
  
  <p><img src="https://i.stack.imgur.com/FrjXD.png" alt="PDF Display Screen"></p>
  
  <p>I tried in every way. I need to open this PDF, Print it and redirect to another page.</p>