title: Generating PDF of a Web Page
body: <p>I'm trying to generate a <code>pdf</code> file of a web page and want to save to local disk to email later.</p>
  
  <p>I had tried <a href="https://stackoverflow.com/a/16124992/1111502">this</a> approach but the problem here is, its not working for pages like <a href="http://www.chartjs.org/samples/latest/charts/pie.html" rel="nofollow noreferrer">this</a>. I'm able to generate the <code>pdf</code> but its not matching with web page content.</p>
  
  <p>Its very clear that <code>pdf</code> is generated before <code>document ready</code> or might be something else. I'm unable to figure out the exact issue. I'm just looking for an approach where I can save web page output as <code>pdf</code>.</p>
  
  <p>I hope generating <code>pdf</code> of a web page is more suitable in <code>node</code> then <code>php</code>? If any solution in <code>php</code> is available then it will be a big help or even node implementation is also fine.</p>