Free Support Forum -

Page number of all the PPTX slides show 0

Aspose Version: 20.1
Language: C#

On Extracting the image from the Attached PPTx file, the (25.8 KB)
page number for all the slides showing 0.
PFA pptx for it.
Any Suggestion?

Thank you for your request. Unfortunately, I haven’t managed to reproduce the issue with Aspose.Slides 20.1 and 21.4. Could you share the code example reproducing the error, please? But first, please check the issue with the latest version of Aspose.Slides.

Thanks Andrey.
can you plz share all extracted image to compare with my local images(20.1v)?

Here is my slide thumbnails:
sample_slide_1.png (2.4 KB)
sample_slide_2.png (2.4 KB)
sample_slide_3.png (2.5 KB)

I used the code as following:

var presentation = new Presentation(dataPath + "sample.pptx");
for (int i = 0; i < presentation.Slides.Count; i++)
    var thumbnail = presentation.Slides[i].GetThumbnail(1, 1);
    var outPath = dataPath + "sample_slide_" + (i + 1) + ".png";
    thumbnail.Save(outPath, ImageFormat.Png);

Hi Andrey,

The code that you have pasted, is creating the image per slide.
This code seems to be working as expected in 20.1v.
However, Instead of converting slides to an Image, we are extracting images of all shapes.

Below Code Sample:-

public void ExportImagesForMasters(String outputDirectory, String manifestFileName)
//m_Presentation - pptx object
foreach (var curMaster in m_Presentation.Masters)
foreach (var curShape in curMaster.Shapes)
Guid curId; // random image name
using (var curImage = curShape.ToBitmap())
target.Save(outputDirectory, System.Drawing.Imaging.ImageFormat.Png);
public static Bitmap ToBitmap(this IShape shape)
return shape.GetThumbnail(ShapeThumbnailBounds.Slide, 1,1);

Any thought?

Thank you for the code example. I reproduced the error and received the same result. I’ve logged the issue in our tracking system with ID SLIDESNET-42564. Our development team will investigate this case. You will be notified when it is fixed.