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

Free Support Forum - aspose.com

Chart disappear when redener in PDF

Hi,

I have an excel file including some column charts, when I save it to PDF, the charts are not available. I have uploaded my excel file, could you please take a look?

Thanks,
Wei

Hi Wei,


Thank you for contacting Aspose support.

We have evaluated your presented scenario on our end while using the latest version of Aspose.Cells for .NET 8.2.2, and are able to observe the problem. The charts in the provided spreadsheet has not rendered in the resultant PDF (attached). We have logged this problem in our bug tracking system under the ticket CELLSNET-43092 for further investigation & correction purposes. Please spare us little time to properly analyze the problem cause, and to provide a fix at earliest possible. In the meanwhile, we will keep you posted with updates in this regard.

Hi Wei,


Thank you for your patience with us.

Please check the following piece of code that renders the said charts properly in the resultant PDF file.

C#

Workbook wb = new Workbook(“D:/temp/ChartTest1.xlsx”);
wb.Save(“D:/temp/output.pdf”, new PdfSaveOptions { ImageType = ImageFormat.Png });

The trick is to save the images in the spreadsheet to PNG format. This can be done using the PdfSaveOptions class as demonstrated above.

Please feel free to write back in case you need our further assistance.