In my current project, I try to add a BufferedImage to a PDFBox document. More specificly, I use an image from a JFreeChart. My code looks like thi
BufferedImage
JFreeChart
Two things stand out:
Do not swallow exceptions.
Do use ChartUtilities to render the image in a suitable format, as suggested here.