title: Automatically print a webpage to pdf
body: <p>While using browsers like Chrome and Firefox, there is an option to print the page to PDF (that is saving the webpage as a PDF file).</p>
  
  <pre><code>&lt;a href="JavaScript:window.print();"&gt;Print this page&lt;/a&gt;
  </code></pre>
  
  <p>This code opens up the print page from where the user should manually choose print to PDF. Can this be done automatically? If so please help.</p>