I need to generate charts using JFreeChart and then export them to PDF using Apache PDFBOX. I don\'t want to use iText as it cannot be used in proprietary software.
I se
You can try using JasperReports. They are a bit heavy, but working good.
Copy the OutputStream
from your chosen writeChartAs*()
method in ChartUtilities to the InputStream
used to create a PDXObjectImage
in AddImageToPDF. A typical copyStream()
implementation is shown here.
Addendum: Alternatively, use piped streams to copy from output to input, as shown here and here.