PPTX to PDF: System.Drawing.Common Is Not Supported on This Platform

I have dockerized a dotnet 8 application and trying to convert a pptx file to pdf using aspose.slides package but getting “System.Drawing.Common is not supported on this platform”. How do i fix the error, tried using aspose.drawing package i installed the package and set the license, even after that issue was not fixed.

Docker is using the mcr.microsoft.com/dotnet/aspnet:8.0-alpine image

@Naqib,

Cross-platform Aspose.Slides for .NET 6 can be used for .NET 7 and future .NET releases. Please take a look at this article for your reference.

Aspose.Slides for .NET NuGet package contains an assembly for .NET 6 that depends on System.Drawing.Common (for Windows only). Aspose.Slides for .NET ZIP and MSI packages contain the same and additionally, cross-platform version that does not depend on System.Drawing.Common that you may use.

PS. please try using latest version Aspose.Slides.NET v23.12.

Thank you, i will try and update here if it works

@Naqib,

Sure, please refer to the document and try latest version of the API and take your time to test your scenario/case.

cells, word and pdf works, slides throws an exception and docker exits

This is the exception thrown:
terminate called after throwing an instance of ‘std::logic_error’
what(): basic_string::_M_construct null not valid

Am i missing any dependency, when i run locally in my ubuntu wsl it works fine, this error is only in docker

@Naqib,

Could you please see the document and configure to follow the guidelines on how to use/run Aspose.Slides on docker if it works now?
https://docs.aspose.com/slides/net/how-to-run-aspose-slides-in-docker/

The issue was due to missing fonts, after i installed font packages it works now.
Thanks amjad

@Naqib,

Good to know that you have sorted it out now. If you have any further queries or issues, please feel free to contact us again.