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

Free Support Forum - aspose.com

GetThumbnail fails

Hi there. I have noticied that my code of thumbnail generation always fails on slide #11… I have checked two different ppt files…

Here is my code:

List<byte[]> result = new List<byte[]>();
MemoryStream sourceStream = new MemoryStream(sourceContent);
MemoryStream resultStream = null;

try
{
Presentation doc = new Presentation(sourceStream);
RetrieveInfo(doc);
Slide slide;
Image image;
Size size = new Size((int)Width, (int)Height);

for (int i = 1; i <= doc.Slides.Count; i++)
{
resultStream = new MemoryStream();

slide = doc.GetSlideByPosition(i);
image = slide.GetThumbnail(size);
image.Save(resultStream, ToSystemImageFormat(outputFormat));
result.Add(resultStream.ToArray());
}
}
catch (Exception exc)
{
throw new Exception(exc.Message);
}
finally
{
sourceStream.Dispose();
if (resultStream != null)
resultStream.Dispose();
}

The ppt file in attachment

Hello Dear,

I have investigated the presentation in detail and have successfully been able to generate the slide thumbnails of entire presentation with no problems using Aspose.Slides for .NET 4.3.0. Please try using the mentioned product version which is available for download here.

Thanks and Regards,

I am using the same version, from Total pack with Total license. My computer works under Windows 7 OS with MS Office 2007

Hello Dear,

I feel there may be some issue with the fonts that may be used in the presentation. I am using Aspose.Slides for .NET 4.3.0, which is available for download here. Aspose.Total also uses the same version but just for assurance please try the shared version. I am also using Windows 7 and PowerPoint 2007 on my machine.

Thanks and Regards,

With Aspose Slides version you suggested to check it fails on 12-th slide… Same code, same PowerPoint file.

Hello Dear,

Can you please share the complete stack trace with us so that we may investigate the issue on our end.

Thanks and Regards,