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

Free Support Forum - aspose.com

Pie chart legend colors after save to PDF doesn't match up to slices

Hi - I have an excel spreadsheet that has a pie chart with specific colors for each slice. When opening via aspose.cells and saving as pdf the legend does not match up with pie slices.

Bug or am I doing something wrong?


Thanks for using Aspose APIs.

Please provide us your problematic Excel file for our testing. Please also download and try the most recent version and see if it makes any difference and resolves your issue.

I tried with latest build and same issue occurs.

Sample spreadsheet.

Sample code…

    Public Shared Function SaveAsPDF(ByVal sourceWorkBook As String, password As String) As String

        Dim workbook As Workbook = New Workbook(sourceWorkBook)

        Dim pdfSaveOptions As New PdfSaveOptions(SaveFormat.Pdf)

        If password <> String.Empty Then
            pdfSaveOptions.SecurityOptions = New PdfSecurity.PdfSecurityOptions() With {.UserPassword = password}
        End If

        workbook.Save(sourceWorkBook.Replace(".xlsx", ".pdf"), pdfSaveOptions)

        Return sourceWorkBook.Replace(".xlsx", ".pdf")
    End Function


Thanks for using Aspose APIs.

We were able to observe this issue as per your description (i.e. please see the output Pdf generated by the following code) and logged it in our database for investigation and for a fix. Once, we will have some news for you relating to this issue, we will update you asap.

This issue has been logged as

  • CELLSNET-46082 - Pie Chart Legend Colors change after saving to PDF and do not match up with Pie Chart Slices


Workbook wb = new Workbook("Sample.20180425.xlsx");



Download Link:
output.pdf (241.3 KB)

Thanks - any work arounds or time frame? I just purchased for this purpose and need to know how I should proceed if a fix won’t be available for a while.


As we just logged the ticket, so could you spare us a little time (3-5 days or so) for complete evaluation and investigation for your issue. If it is not much complex, you should be receiving the fix before the end of next week or even before it. If the issue is complex, it might take a couple of weeks.

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

Great - thank you.

Hi - checking on the status of this. I just need to know if soon or if I should look for alternate solutions.


Thanks for using Aspose APIs.

We are afraid, we do not have any update for you regarding this issue at this moment. You should wait at least next Wednesday and then check with us again. If we have some update earlier than this time span, we will update you in this topic.

Hi - just checking in on this issue.


We have logged your comment in our database so that this issue could be fixed at the earliest. Once, we will have some update for you, we will let you know asap.


This is to inform you that we have fixed your issue “CELLSNET-46082” now. We will soon provide you the fixed version after performing QA and incorporating other enhancements and fixes.

Once the new version/fix is released, we will share the Download link.


Please try our latest hotfix/version: Aspose.Cells for .NET v18.5.1, it should fix your issue:

Let us know your feedback.

The issues you have found earlier (filed as CELLSNET-46082) have been fixed in this update. Please also check the document/article for your reference: https://docs.aspose.com/display/cellsnet/Installation