title: How to print pdf from window.print() using Javascript?
body: <p>I am opening new window in that passing pdfurl. when i click print pdf, pdf document will open very nicely in new window. but when i do, newwindowInstance.print(); it is throughs error like this <strong>TypeError: 'undefined' is not a function (evaluating 'win.print()')</strong>. Below i have given code. Can any one tell me. how to resolve this issue. How print pdf from window print? Great appropriated. Thank you.</p>
  
  <p><strong>Code Here:</strong> </p>
  
  <pre><code>var win = window.open(speficationUrl, name);       
          setTimeout(function() {
              win.print();
              win.close();
          }, 5000);
  </code></pre>