Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 2 years ago.
I would like to generate a chart from a dataset and eventually put it in a pdf format. How would I go about doing this? Which packages would you recommend?
A solution might to go in two steps :
- first, generate the chart, and save it as an image
- then, embed this image in a PDF file
About the first point, there are many questions/answers that might help you ; for instance :
- Graphs/Charts in PHP
- What is the best open source PHP charting solution
- Free Chart Libraries for PHP
- References on creating Charts/Graphs in PHP ?
About the second point, I've not done that quite often, but I suppose Zend_Pdf
, for instance, could be helpful -- note there are probably other solutions too !
Take a look at the Diagrams AddOn for fpdf.
I've never used it but would give it a try before storing a raster image of a chart in a pdf.
You can insert charts in PDF as an image too.
Google's Image Charts is deprecated but still works.
A ditto copy of Google's Image Charts is Image Charts which has free version with their watermark.