We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Inserting chart as an image from excel template to pdf in Java

I'm trying to insert a chart image at the appropriate postion into a pdf file from an excel template. The excel may contain many chart images in between other tables.I have to follow this route because excel cannot save chart images into the pdf document. Please help.

Thank you,


Well, when you use Excel to Pdf feature in java (using Aspose.Cells for Java and Aspose.Pdf for Java), charts won’t be rendered to pdf format, see the Conversion attributes table in the document: http://www.aspose.com/documentation/java-components/aspose.cells-for-java/converting-to-pdf-files.html

I think you may try to take the image of the chart using new Chart to Image feature provided by Aspose.Cells for Java (since the release of v2.1.2), see the document for reference: http://www.aspose.com/documentation/java-components/aspose.cells-for-java/converting-chart-to-image.html and put the image file to pdf document using Aspose.Pdf for Java API.

If you find any issue regarding Aspose.Cells for Java end, kindly let us know with complete details, sample code and template files. We will check it soon.

Thank you.

Hi Amjad,

Thank you for the reply.

I did successfully use the ChartToimage and place it in pdf but how do you place it in the appropriate place in the pdf. The chart may be between two tables and in the pdf also it should be in the same order. How do you know the position where the chart has to be placed in the pdf.



I think, for this, you need to contact Aspose.Pdf for Java team, you may post a query in Aspose.Pdf forum.

Thank you.

Ok thank you. I will contact the pdf team.