title: print pdf with javascript
body: <p>I know that there are a lot of questions about this, but I test all and not fix my problem. I have the following code:</p>
  
  <pre><code>var datauri = //PDF in base64
  popup = window.open("", "Your PDF","width=1024,height=768,resizable=yes,scrollbars=yes,toolbar=no,location=no,directories=no,status=no,menubar=no,copyhistory=no,id='printPDF'");       
  popup.document.location.href = datauri;//show pdf in other page
  popup.print();//print pdf
  </code></pre>
  
  <p>But, when I print the PDF, the page appear empty, but when I close the window of print, show the PDF, I tried with a lot of stuff, but nothing works, please help me :(</p>