Chart Is Missing When Converting a PowerPoint Presentation to PDF in C#

We noticed that when we save a PPTX document as PDF we are missing the chart.

Presentation with chart.zip (32.6 KB)

@fhellemond

Cause

The issue of missing charts when exporting a PPTX document to PDF using Aspose.Slides can occur due to various reasons, such as unsupported chart types, incorrect export settings, or issues with the chart data itself.

Solution

To troubleshoot and resolve this issue, follow these steps:

  1. Check Chart Compatibility: Ensure that the chart type used in your presentation is supported by Aspose.Slides. Some complex chart types may not render correctly.

  2. Update Aspose.Slides: Make sure you are using the latest version of Aspose.Slides. Updates often include bug fixes and improvements for better compatibility with various features.

  3. Export Options: Use the PdfOptions class to specify export settings that might affect chart rendering. For example, you can set the TextCompression or Compliance options.

  4. Test with a Simple Chart: Create a new presentation with a simple chart and try exporting it to PDF. This will help determine if the issue is specific to the original presentation or a general problem.

Code

Here’s a sample code snippet to export a PPTX file to PDF with specific options:

using Aspose.Slides;
using Aspose.Slides.Export;

public void ExportPptxToPdf(string pptxFilePath, string pdfFilePath)
{
    using (Presentation presentation = new Presentation(pptxFilePath))
    {
        PdfOptions pdfOptions = new PdfOptions
        {
            TextCompression = PdfTextCompression.Flate,
            Compliance = PdfCompliance.Pdf15
        };

        presentation.Save(pdfFilePath, SaveFormat.Pdf, pdfOptions);
    }
}

Next Steps

  1. Test the provided code with your presentation.
  2. If the issue persists, share the specific chart details or a sample presentation for further investigation.
  3. Review the Aspose.Slides documentation for any additional settings that may be relevant to your charts.

Please proceed with these steps, and let me know if you need further assistance!

I applied the extra pdfOptions as suggest when saving but it still doesn’t appear in the export.

@fhellemond,
I’ve reproduced the issue where the chart is missing when converting the PowerPoint presentation to a PDF document. We are sorry that you encountered this problem.

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): SLIDESNET-45030

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.