Failed to Load Large PowerPoint Presentation with Several SVG Images in C#

Hi there

Running version Slides .Net 224

I’m getting an error when we try to open a presentation.

The following error is thrown as part of the Presentation pres = new Presentation(…) call

Aspose.Slides.PptxReadException: Parameter is not valid.
—> System.ArgumentException: Parameter is not valid.
at System.Drawing.SafeNativeMethods.Gdip.CheckStatus(Int32 status)
at System.Drawing.Bitmap…ctor(Int32 width, Int32 height, PixelFormat format)
at System.Drawing.Bitmap…ctor(Int32 width, Int32 height)
at ​ …ctor( )
at  . ()
at  .( )
at  ​​. ()
at  .( )
at  ​​.(String ,  , Int32 , Int32 )
at  ​​.(String , Int32 , Int32 )
at  ​​.(String )
at Aspose.Slides.ImageCollection.(ISvgImage , Single , Single , Boolean& )
at Aspose.Slides.ImageCollection.(ISvgImage )
at Aspose.Slides.ImageCollection.AddImage(ISvgImage svgImage)
at  .(ISlidesPicture ,  ,  ​ )
at  .(ISlidesPicture ,  ,  ​ )
at  .(ISlidesPicture ,  ,  ​ )
at  .(PictureFillFormat ,  ,  ​ )
at  .(IPictureFrame ,  ,  ​ )
at  ​ .( , IGroupShape ,  ​ )
at  ​ .(IGroupShape ,  ,  ​ )
at  ​ .( , IGroupShape ,  ​ )
at  ​ .(IGroupShape ,  ,  ​ )
at  .(IBaseSlide ,  ,  ​ )
at  .(Slide )
at  .(IPresentation )
at  ​.( , IPresentation )
at  ​.(Presentation , Stream , InterruptionToken )
— End of inner exception stack trace —
at  ​.(Presentation , Stream , InterruptionToken )
at Aspose.Slides.Presentation.(Stream , Boolean )
at Aspose.Slides.Presentation.(Stream , Boolean )
at Aspose.Slides.Presentation.(String , Boolean )
at Aspose.Slides.Presentation.(String )
at Aspose.Slides.Presentation…ctor(String file)
at xxx

After reducing the file and searching for the slide with the issues, i found that the issues is caused by some svg icons on a few slides.

I have made a simple version of the slide that only contain the error-causing elements and uploaded it here: error_input.pptx - Google Slides

I hope you might be able to provide some direction on how to solve this issue

be
Anders

@ahthomsen,
Thank you for reporting the issue.

I’ve reproduced the problem with loading the presentation and added a ticket with ID SLIDESNET-43209 to our issue tracking system. We apologize for any inconvenience. Our development team will investigate this case. You will be notified when the issue is resolved.

The issues you have found earlier (filed as SLIDESNET-43209) have been fixed in Aspose.Slides for .NET 22.6 (ZIP, MSI).
You can check all fixes on the Release Notes page.
You can also find the latest version of our library on the Product Download page.