I'm trying to generate a `pdf` file of a web page and want to save to local disk to email later.

I had tried [this](https://stackoverflow.com/a/16124992/1111502) approach but the problem here is, its not working for pages like [this](http://www.chartjs.org/samples/latest/charts/pie.html). I'm able to generate the `pdf` but its not matching with web page content.

Its very clear that `pdf` is generated before `document ready` 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 `pdf`.

I hope generating `pdf` of a web page is more suitable in `node` then `php`? If any solution in `php` is available then it will be a big help or even node implementation is also fine.