System.PlatformNotSupportedException: System.Drawing is not supported on this platform

Hello,

We are running Aspose.Cells in a linux docker container.

https://hub.docker.com/_/microsoft-dotnet-core-runtime/

During runtime, we get the following error when trying to save an Excel file to PDF.

System.PlatformNotSupportedException: System.Drawing is not supported on this platform.
   at System.Drawing.Imaging.ImageFormat.get_Emf()
   at Aspose.Cells.PdfSaveOptions..ctor(SaveOptions )
   at Aspose.Cells.FileFormatUtil.(String , FileFormatType , SaveFormat , SaveOptions)
   at Aspose.Cells.Workbook.Save(Stream stream, SaveFormat saveFormat)

The version we are using is Aspose.Cells 20.3.0.

@randysimplist,
libgdiplus is required by Aspose.Cells while running on docker container. You may please follow the steps below where Ubuntu 18.04.2 LTS (Bionic Beaver) is used by us in a docker container and share the feedback.

Here are the steps:

  1. The docker I use is: microsoft/dotnet, install it first:
    sudo docker pull microsoft/dotnet
  2. Then I install libgdiplus:

apt-get update
apt-get install -y libgdiplus
cd /usr/lib && ln -s libgdiplus.so gdiplus.dll

  1. And install libc6-dev:

apt-get install -y --no-install-recommends libc6-dev

Thank you for the prompt reply.

We resolved the issue on our end. It was due to a missing deps.json file.

@randysimplist,

Good to know that your issue is sorted out now. Feel free to contact us any time if you need further help or have some other issue or queries, we will be happy to assist you soon.