Excel to PDF rendering - Spreadsheet having chart renders differently in .NET

We have a spreadsheet which we are exporting to PDF and XLS using your Aspose.PDF and Aspose.Cells libraries.

The source data is a simple 3 columns by 4 rows of data, with a chart that plots that data. We turn on data labels for the chart, and also set custom axis bounds (min 0, max 10000). Some of the data values exceed this 10000 limit.

When exported to XLS, the data labels for all data points below 10000 are displayed as expected. However, the other data values overflow the plot area of the chart and therefore you cannot see the top edge of the bar representing the data point (or the corresponding data labels).

But when the same data/chart is exported to PDF, all the data labels seem to appear, even for the ones that overflow the plot area, up to the top edge of the chart area. This is inconsistent with the XLS rendering, and not what we are expecting.

Can you please confirm whether this is a bug? Is there a possible workaround to fix this?

I have attached both the PDF and XLS files so you can see the problem.

AsposeDataLabelDisplay Bug 56960.zip (30.7 KB)

@mark.attridge,
We were able to observe the issue but we need to look into it more. We have logged the issue in our database for investigation and for a fix. Once, we will have some news for you, we will update you in this topic.

This issue has been logged as

CELLSNET-46802 - Chart rendered differently in XLS than PDF

Please note that only Aspose.Cells is used to reproduce this issue with the following code and no feature from Aspose.PDF is used. Please confirm as you have mentioned that you are using Aspose.PDF also to test this issue.

Workbook wb = new Workbook("AsposeDataLabelDisplay Bug 56960.xlsx");
wb.Save(path + "output.pdf");
wb.Save(path + "output.xls");

My apologies for the mixup. We were not using the Aspose.PDF library. We were using the Aspose.Cells library to perform the wb.Save method for both xls and pdf (as like your example). The output is correct when we save to xls/xlsx, but is incorrect when we save to pdf.

@mark.attridge,
No problem and thank you for the feedback. We have already logged this issue with Aspose.Cells only.

@mark.attridge,

Please try our latest version/fix: Aspose.Cells for .NET v19.6.5 (attached).

Your issue should be fixed in it.

Let us know your feedback.
Aspose.Cells19.6.5 For .Net2_AuthenticodeSigned.Zip (4.9 MB)
Aspose.Cells19.6.5 For .Net4.0.Zip (4.9 MB)

The issues you have found earlier (filed as CELLSNET-46802) have been fixed in Aspose.Cells for .NET v19.7. This message was posted using BugNotificationTool from Downloads module by Amjad_Sahi

Sorry for the delay. I can confirm that this issue is now resolved using the update you provided.

Thank you!

@mark.attridge,
Good to know that your issue is sorted out . Feel free to contact us at any time if you need further help or have some other issue or queries, we will be happy to assist you soon.