Hi Team,
I have a sample PPTX with a single slide having a single shape. When I get an image of this shape using Aspose, I see that the text “Time, t, in seconds” appears to be cut. I am using Aspose 25.5 version.
Code:
using Aspose.Slides;
using Aspose.Slides.Export;
using System.Drawing.Imaging;
class Program
{
static void Main(string[] args)
{
try
{
// Load the presentation
using (Presentation presentation = new Presentation("sample.pptx"))
{
int shapeCounter = 1;
// Loop through all slides
for (int slideIndex = 0; slideIndex < presentation.Slides.Count; slideIndex++)
{
// Get current slide
ISlide slide = presentation.Slides[slideIndex];
// Process each shape in the current slide
foreach (var curShape in slide.Shapes)
{
using (var curImage = curShape.GetImage())
{
// Save the image with a unique name including slide number
string fileName = $"slide_{slideIndex + 1}_shape_{shapeCounter}.png";
curImage.Save(fileName, Aspose.Slides.ImageFormat.Png);
Console.WriteLine($"Image saved successfully as {fileName}");
shapeCounter++;
}
}
}
}
}
catch (Exception ex)
{
Console.WriteLine($"An error occurred: {ex.Message}");
}
}
}
sample.zip (46.5 KB)
Screenshot (112).png (124.2 KB)
Kindly help us resolve this issue. Thanks,