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

Free Support Forum - aspose.com

Loading presentation throws exceptions

Hi Aspose,

I’ve just faced the following issues.

Aspose.Slides.PptxReadException: A generic error occurred in GDI+. —> System.Runtime.InteropServices.ExternalException: A generic error occurred in GDI+.
at System.Drawing.Image.FromStream(Stream stream, Boolean useEmbeddedColorManagement, Boolean validateImageData)
at Aspose.Slides.ImageCollection.AddImage(MemoryStream stream)
at Aspose.Slides.ImageCollection.AddImage(Byte[] buffer)

Aspose.Slides.PptxReadException: Parameter is not valid. —> System.ArgumentException: Parameter is not valid.
at System.Drawing.Text.PrivateFontCollection.AddMemoryFont(IntPtr memory, Int32 length)
at .(Byte[] , String , LoadOptions )
at .(String , Int32 , Int32 , FontStyle, ? , LoadOptions )
at ? .( ,? , String , Int32, Int32 , FontStyle , ? )
at ? .(? , , ? )
at ? .(IPresentation )
at ? .( , IPresentation )
at ? .(Presentation , Stream )
— End of inner exception stack trace —

The exceptions was thrown at

Presentation presentation = new Presentation(inputFile);

System.NotImplementedException: Not implemented.
at System.Drawing.Drawing2D.LinearGradientBrush.MultiplyTransform(Matrix matrix, MatrixOrder order)
at System.Drawing.Drawing2D.LinearGradientBrush.MultiplyTransform(Matrix matrix)
at Aspose.Slides.?? .(? )
at Aspose.Slides.?? .(? )
at Aspose.Slides. .(? , ? )
at Aspose.Slides.? .(? )
at Aspose.Slides. .(? , Boolean )
at Aspose.Slides.? .( ? )
at Aspose.Slides.? .cvv5bkafcgg9ewslfqagwly75cbz35rk ( ? )
at Aspose.Slides. ? .kybt9r8newhhbyqpp8npnqw4qrjxm4gr (?? )
at Aspose.Slides.?? .kybt9r8newhhbyqpp8npnqw4qrjxm4gr (?? )
at Aspose.Slides.?? .kybt9r8newhhbyqpp8npnqw4qrjxm4gr (?? )
at Aspose.Slides.?? .kybt9r8newhhbyqpp8npnqw4qrjxm4gr (?? )
at Aspose.Slides. ? .kybt9r8newhhbyqpp8npnqw4qrjxm4gr (?? )
at Aspose.Slides.? .(?? )
at Aspose.Slides. ? .(Presentation , Stream , Int32[] , PdfOptions )
at Aspose.Slides. ? .(Presentation , Stream , PdfOptions )
at Aspose.Slides.Presentation.Save(Stream stream, SaveFormat format, ISaveOptions options)
at Aspose.Slides.Presentation.Save(String fname, SaveFormat format)

Can you help me check them? Be careful, some of them are virus.
https://drive.google.com/open?id=0B--6BypmlzMPcnQ0anRYOHNJRms
646b88b66de04075b1426b5a676b079a.zip (144.1 KB)

Thank you,
Dung H. Nguyen

@dunghnguyen,

I have observed the issue shared by you and suggest you to please first try using Aspose.Slides for .NET 17.7 on your end. If there is still an issue then please share the working sample code reproducing the issue on your end.

@mudassir.fayyaz

I’m using 17.7 and also shared sample above.

Presentation presentation = new Presentation(inputFile);
presentation.Save(outputFile, Aspose.Slides.Export.SaveFormat.Pdf);

@dunghnguyen,

I have worked with source code and sample presentation and unable to observe any issue. I have also shared my generated result with you for kind reference. Please see attachment. Can you please share your sample project and environment details with us so that we can further investigate to help you out.64result.zip (546.8 KB)

Hi @Adnan.Ahmad,

Thank you for your time.
My code is only

try
{
Presentation presentation = new Presentation(inputFile);
presentation.Save(outputFile, Aspose.Slides.Export.SaveFormat.Pdf);
return 0;
}
catch (Exception e)
{
Console.WriteLine(e.ToString());
return 1;
}

I forgot to mention that it happened in Windows Server 2008 R2 and CentOS 6.5.
I compiled an .exe, then I tried to execute it in CentOS under Wine (https://www.winehq.org/)

WINEARCH=win32 WINEDEBUG=-all wine test.exe

Regards,
Dung H. Nguyen

@dunghnguyen,

I have observed your comments. A ticket with ID SLIDESNET-39226 has been created in our issue tracking system to further investigate and resolve the issue. This thread has been linked with issue so that you may be automatically notified once issue will be fixed.

We are sorry for your inconvenience,