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

Free Support Forum - aspose.com

Cannot Convert PPT File to PDF Format on Linux with Aspose.Slides for .NET 21.11

When I try to convert ppt file to pdf format, I get “C++ exception with description “The type initializer for 'Aspose.Slides.​ ’ threw an exception.” thrown in the test body.”
I use Aspose.Slides for .Net 21.11.
My OS - Linux Mint 19.2 Cinnamon, Cinnamon version - 4.2.4
Mono version - Mono JIT compiler version 4.6.2 (Debian
My test file - Test.ppt.zip (23.5 KB)

The code for conversion is below:

var doc = (new Aspose.Slides.PresentationFactory()).ReadPresentation(inputStream);
doc.Save(outputStream, Aspose.Slides.Export.SaveFormat.Pdf);

Conversion with Aspose.Slides for .NET 21.08 goes without errors.
Also I cannot convert it on mac with latest mono version

Welcome to our community! Thank you for the issue description.

It will take me a while to check the problem you described. We will reply to you as soon as possible.

Could you share the stack trace for the exception, please?

I call my code via mono_runtime_invoke(). If I add mono_print_unhandled_exception() I get:

Unhandled Exception:
System.TypeInitializationException: The type initializer for 'Aspose.Slides.​ ’ threw an exception.
at (wrapper managed-to-native) System.Object:__icall_wrapper_mono_generic_class_init (intptr)
at Aspose.Slides. .vex4dmrqbyxhpscf9l4n33smrsew344k () [0x0005a] in :0
at Aspose.Slides. …ctor (Aspose.Slides. , System.Object ) [0x00022] in :0
at Aspose.Slides. . () [0x0002b] in :0
at Aspose.Slides. . () [0x000b7] in :0
at Aspose.Slides. …ctor (Aspose.Slides. , Aspose.Slides. ) [0x00073] in :0
at Aspose.Slides. . () [0x00032] in :0
at Aspose.Slides. . (Aspose.Slides. , Aspose.Slides.InterruptionToken ) [0x000b1] in :0
at Aspose.Slides.Presentation. (Aspose.Slides. ) [0x0002d] in :0
at Aspose.Slides.Presentation. (System.IO.Stream , System.Boolean ) [0x001a4] in :0

Thank you for the additional information. I added a ticket with ID SLIDESNET-42988 in our issue tracking system. Our development team will investigate this case. You will be notified when the issue is resolved.