How can I put multiple JfreeCharts in to one pdf? There are plenty of examples how to put 1 JfreeChart in to a pdf but I can't find any on how to put multiple JfreeCharts in to 1 pdf.
Some of the JfreeCharts should should go next to each other and others should go below each other.
There's an example in my book: http://itextpdf.com/examples/iia.php?id=262
As you can see, I have two different charts, a pie chart and a bar chart. I draw these charts to a PdfTemplate object. I then add the templates to a canvas using an X,Y coordinate (this allows you to add them next to each other or below each other).
Another option, is to wrap the PdfTemplate objects inside Image objects, and position these images for instance using a PdfPTable.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With