Not Able to Create PDF from PPT in C# Testing on Ubuntu WSL-Version: 2.2.4.0

Hello Support,
I get the exception bellow, when I convert PowerPoint to PDF on ubundu wsl (attached the VS test project. To reproduce run this command: “dotnet vstest TestAsposeSlidesTests.dll” ):

Failed RunTest [1 s]
Error Message:
Test method TestAsposeSlides.Tests.SlidesToPDFTests.RunTest threw exception:
System.PlatformNotSupportedException: System.Drawing.Common is not supported on this platform.
Stack Trace:
at System.Drawing.StringFormat.get_GenericTypographic()
at␦␦…ctor(Bitmap , Boolean)
at␦␦…ctor(Bitmap )
at␦…ctor(Int32 , Int32, Single , Single , Boolean , ␦␦ , , List1 ) at Aspose.Slides.Slide.(Boolean ,, ␦␦ , List1 , InterruptionToken )
at ␦.(Presentation , Stream, Int32[] , PdfOptions , InterruptionToken )
at ␦(Presentation , Stream, PdfOptions , InterruptionToken )
at Aspose.Slides.Presentation.Save(Stream stream, SaveFormat format, ISaveOptions options)
at Aspose.Slides.Presentation.Save(String fname, SaveFormat format)
at TestAsposeSlides.SlidesToPDF.Run(Stream pptExample) in C:\Users\vasil\Downloads\Aspose.Slides-for-.NET-master\TestAsposeSlides\TestAsposeSlides\Class1.cs:line 14
at TestAsposeSlides.Tests.SlidesToPDFTests.RunTest() in C:\Users\vasil\Downloads\Aspose.Slides-for-.NET-master\TestAsposeSlide
s\TestAsposeSlidesTests\SlidesToPDFTests.cs:line 22
at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)

TestAsposeSlides.zip (216.8 KB)

@VasilisGiannoutsos,
Thank you for contacting free support. I am working on the issue and will get back to you soon.

@VasilisGiannoutsos,
Unfortunately, I was unable to reproduce the error you described. Could you please share additional instructions on how to do this?

Sorry can you clarify what you can not reproduce?
Do you mean, that you don’t get any error on your Ubuntu WSL instance from Windows?
I do follow steps:

  • open the attached project with VS 2022
  • build project
  • In PowerShell, start an Ubuntu WSL
  • mount directory and change to ptah: …TestAsposeSlides\TestAsposeSlidesTests\bin\Debug\net8.0
  • run test with command dotnet vstest TestAsposeSlidesTests.dll

@VasilisGiannoutsos,
Thank you for the additional information. I am working on the issue and will get back to you soon.

@VasilisGiannoutsos,
Thank you for your patience. I’ve reproduced the error you encountered.

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): SLIDESNET-44714

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.