Chart Shows Wrong Numeric Values When Converting Slide to Image in C#

Hi Team,

I have a PPTX (attached) with 1 slide. Slide has a Chart with some numeric values. When I try to get image of the slide, I see that the numeric values appear different from that on the PPT. For example, 6.3% comes up as 630.0%.

The code I used:

using Aspose.Slides;
using Aspose.Slides.Export;
using Aspose.Slides.Animation;
using Aspose.Slides.Charts;
using Aspose.Slides.SmartArt;
using Aspose.Slides.Ink;
using System.Drawing;
using System.Drawing.Imaging;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;
using System.Collections;
using System.Xml;
using System.Threading;
using System.Reflection;
using System.IO;
using System.Drawing.Text;
class Program
{
    static void Main(string[] args)
    {
        try
        {
            // Apply Aspose.Slides license
            License license = new License();
            license.SetLicense("Aspose.Total.lic"); // Make sure this file is in your application's directory
            Console.WriteLine("\nLicense applied successfully");

            // Load the presentation
            using (Presentation presentation = new Presentation("sample.pptx"))
            {
                Console.WriteLine("Number of slides in the presentation: " + presentation.Slides.Count);
                
                // Create output directory if it doesn't exist
                string outputDir = "slide_images";
                if (!Directory.Exists(outputDir))
                {
                    Directory.CreateDirectory(outputDir);
                }
                
                // Convert each slide to image
                for (int i = 0; i < presentation.Slides.Count; i++)
                {
                    ISlide slide = presentation.Slides[i];
                    
                    // Create a full scale image
                    using (IImage image = slide.GetImage(1.0f, 1.0f))
                    {
                        string fileName = Path.Combine(outputDir, $"slide_{i + 1}.png");
                        image.Save(fileName, Aspose.Slides.ImageFormat.Png);
                        Console.WriteLine($"Saved slide {i + 1} as {fileName}");
                    }
                }
                
                Console.WriteLine($"\nAll slides exported to images in '{outputDir}' folder");
            }
        }
        catch (Exception ex)
        {
            Console.WriteLine($"An error occurred: {ex.Message}");
        }
    }
}

I used Aspose version 25.9.

79c32f32373749649d540141462f03ed.png (33.5 KB)

sample.zip (1.6 MB)

Pls find attached the output image as well.

Could you pls help me resolve this issue ? Thank you,

#ref: CONN-4170501

@bhav,
Thank you for reporting the issue. I have reproduced the problem where the number format of the chart data labels changes when converting the slide to an image. We apologize for any inconvenience caused.

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-45177

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.