asposepdf.PNG (88,9 KB)
If I create an empty pdf document in .NET 8 under Linux (see picture of my simple app in .NET Fiddle online C# compiler) an exception is thrown when computing the Background Property of the Pdf Document. It appears, it uses System.Drawing.Common which is not supported on non-Windows platforms (.NET Fiddle also runs in Linux). I observed the same behaviour in my Docker Container on my dev machine with a simple console app. If I run the app under Windows it’s all ok, if I run it with docker I get the same error. I tried adding Aspose.Drawing, Aspose.Drawing.Common, Aspose.Imaging, Aspose.Drawing.Imaging packages and “using” statements, nothing helped.
In my Dockerfile I also install the necessary packages but it is still not working. This is my dockerfile
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
RUN apt-get update && apt-get install -y cifs-utils iputils-ping libsecret-1-0 libsecret-1-dev gnome-keyring libsecret-tools libfontconfig1 libcairo2-dev fonts-dejavu-core libgdiplus libc6-dev libx11-dev libx11-6 libx11-data libx11-xcb1 libxrender1 libxext6 fontconfig