Free Support Forum -

getThumbnail() exception

I am currently evaluating Aspose.Powerpoint and have run into an exception with getThumbnail. Any help or suggestions would be appreciated. (I am using .NET framework 1.1 on XP (SP 2) and Powerpoint 2002.) I have sent an attached one slide powerpoint presentation that generates the error to the listed email.

Note: The code works fine using the demo.ppt provided in the download.

Thank you,

I receive the following error when using Slide.getThumbnail():
[OverflowException: Overflow error.]
System.Drawing.Graphics.CheckErrorStatus(Int32 status) +136
System.Drawing.Graphics.DrawLine(Pen pen, Int32 x1, Int32 y1, Int32 x2, Int32 y2) +131
System.Drawing.Graphics.DrawLine(Pen pen, Point pt1, Point pt2) +21
Aspose.PowerPoint.Line.Draw(Image img, Rectangle group_rect, Rectangle rect) +716
Aspose.PowerPoint.Line.Draw(Image img) +153
Aspose.PowerPoint.Slide.GetThumbnail(Double scaleX, Double scaleY) +353

Following is the code used:

string fileName = @“C:\documents\presentations\common\Thank_1.ppt”;

System.IO.FileStream fis = new System.IO.FileStream(




Presentation pres = new Presentation(fis);


for(int i=0; i<pres.Slides.Count; i++)


Slide slide = pres.SlidesIdea;

System.Drawing.Image smallImage = slide.GetThumbnail();


Dear Steve,

Thank you for the ppt and code.
Bug was fixed. Please check new 1.3.3 hot fix.

Thank you for taking the time to fix the bug. I downloaded the hot fix and it worked fine for that slide. Of course, the next thing I tried was iterating through a group of presentations and exporting thumbnails and I ran into a few issues:

1. On a one slide presentation with a master slide, two images were created. One with the master and one with the slide content. The slide content image did not include the graphics from the master slide.

2. Received the following error using a different one slide presentation.
[NullReferenceException: Object reference not set to an instance of an object.]
Aspose.PowerPoint.PictureFrame.Draw(Image img)
Aspose.PowerPoint.Slide.GetThumbnail(Double scaleX, Double scaleY)

Are there any restrictions on getThumbnail()? That is, are there certain attributes of a PPT presentation that getThumbnail can not render?

I can provide additional sample presentations, if you would like.

Thank you,

Dear Steve,

Yes, GetThumbnail is far from perfect yet. I know. We need a lot to do here.
It’s just a start point of rendering slides.