I want to build a reporting service that can produce a pdf report consisting of a basic template and also feature charts.
The idea I have is to use a blade view template and render it into a pdf using something like Laravel Snappy. I am aware of charting libraries such as chart.js which are nice-looking and easy to use. However, they rely on javascript to render the charts which does not play nice with server-side pdf renderers. I reckon the best approach is if the chart be rendered as an svg which can be styled accordingly. There is the chartist library which produces stylable svg output but it too is client-side.
Can anyone suggest a nice server-side solution to producing a pdf report from an html template containing charts, or at least a reliable way to render javascript-generated charts?
UPDATE
It seems laravel-snappy (i.e. wkhtmltopdf) is able to process client-side javascript in an html template. It remains to be seen how more complex templates come out but a basic chartist.js example is working.
I'd still be keen to hear how others have gone about this as I imagine this is a semi-common task.