In order to add charts into PDF, it was necessary to convert those charts into images first and then use those images in PDF document. To implement this feature, vteam #474 had two choices only; either use some server side library to generate charts or somehow be able to generate the charts on server side by using the same library that is currently being used to generate chars on client side/in browser.
Using a server side library would be the typical approach that might have the following drawbacks:
- Needed time to learn new library if it was the first time using it
- Time required to prepare data for the new charts library
- To match it with the existing charts colors and scheme would also require time and money
- Maintenance would be difficult if any single update would require changes in both server and client side charts
phantomjs path/to/highcharts-convert.js -infile “jsonfile.json”-outfile “output_image.png” -constr Chart