Chart area is not rendered correctly in PDF and PNG outputs of Excel Chart

Hello,

I am using Aspose.Cells v17.8.7 to generate PDF and PNG of chart - “Chart” in the attached excel file. The output is not same as the actual chart. The chart area and labels are rendered incorrectly.

Following code is used to generate the output:

Workbook workbook = new Workbook(“test.xlsx”);
WorksheetCollection ws = workbook.getWorksheets();
String worksheetName = “Sheet”;
Chart chart = ws.get(worksheetName).getCharts().get(“Chart”);
chart.toPdf(“aspose response 17.8.7.pdf”);

PFA below the source excel and pdf and png outputs:
attachments.zip (189.3 KB)

Can you please analyse this issue.

Thanks,
Neha

@Neha_Gautam,

Thanks for the template file, screenshot and output files.

After an initial test, I observed the issue as you mentioned by using your sample code with your template file. I found chart area is not rendered correctly in the output PDF and PNG.
e.g
Sample code:

Workbook workbook = new Workbook(“test.xlsx”);
WorksheetCollection ws = workbook.getWorksheets();
String worksheetName = “Sheet”;
Chart chart = ws.get(worksheetName).getCharts().get(“Chart”);
chart.toPdf(“aspose response 17.8.7.pdf”);

I have logged a ticket with an id “CELLSJAVA-42409” for your issue. We will look into it soon.

Once we have an update on it, we will let you know here.

Hello,

Thanks for your reply.

This issue is faced by our customer in their Production Environment, so it is very critical for us. Can you kindly look into this issue on priority and provide a fix for this ASAP. Also, can you please provide a tentative date for when we can expect a fix for this.

Thanks,
Neha

@Neha_Gautam,

Your issue is pending for analysis. I have logged your concerns against your issue “CELLSJAVA-42409” into our database and asked the concerned developer from product team to update on it or share an ETA (if possible).

Once we have any new information, we will share it with you.

@Neha_Gautam

Please download and try the latest fix and let us know your feedback.

The issues you have found earlier (filed as CELLSJAVA-42409) have been fixed in Aspose.Cells for Java 17.10.