Can I use highcharts in a pdf generate with prawn

2019-07-04 06:31发布

问题:

In my rails application, I use highcharts to display some charts. And now, I need to generate a pdf with charts (I will use prawn). I want to know if I can use highcharts in my pdf. Maybe with ExecJS ? Or with an alternative to prawn ?

Thanks!

回答1:

You can use wkhtmltopdf (http://code.google.com/p/wkhtmltopdf/) to render the javascript charts as a PDF

This blog post is helpful: http://www.claytonlz.com/index.php/2011/02/broken-highcharts-wkhtmltopdf/