Conversion error on Azure Linux App Service using GroupDocs.Conversion.CrossPlatform

Hi,

I’m encountering a runtime exception when attempting to convert documents using GroupDocs.Conversion.CrossPlatform on an Azure Linux App Service (.NET 8).

Despite using the CrossPlatform package, conversions fail with the following error:

System.Drawing.Common is not supported on this platform.
GroupDocs.Conversion.Exceptions.GroupDocsConversionException: System.Drawing.Common is not supported on this platform.
 ---> System.PlatformNotSupportedException: System.Drawing.Common is not supported on this platform.
   at System.Drawing.Drawing2D.Matrix..ctor(...)
   ...
   at Aspose.Html.HTMLDocument.RenderTo(IDevice device)
   ...
   at GroupDocs.Conversion.Converter.Convert(...)

From the stack trace, it appears the conversion pipeline (via Aspose.Html) is invoking System.Drawing.Common. On Linux App Service, this results in PlatformNotSupportedException, and Azure App Service does not allow installing system dependencies like libgdiplus.

Environment

  • Azure App Service (Linux)
  • .NET 8
  • GroupDocs.Conversion.CrossPlatform
  • No ability to install OS-level packages (standard App Service limitations)

Questions

  1. Is System.Drawing.Common expected to be used internally by the CrossPlatform library for certain conversions?
  2. Are there supported configurations or rendering backends that avoid System.Drawing entirely on Linux?
  3. Is there official guidance for running GroupDocs.Conversion.CrossPlatform on Azure Linux App Service without Docker?
  4. If not, which conversion scenarios are guaranteed to work headlessly (without System.Drawing)?

Any clarification or recommended deployment approach would be greatly appreciated.

Thank you.

@systemsv

You’re encountering a System.PlatformNotSupportedException for System.Drawing.Common while running GroupDocs.Conversion.CrossPlatform on an Azure Linux App Service.

To investigate this further, could you provide:

  • The exact source and target formats you are converting when the exception occurs (e.g., HTML → PDF, DOCX → PNG).
  • The full version number of GroupDocs.Conversion.CrossPlatform (and any Aspose.Html package) referenced in your project file.
  • The code snippet you use to create and configure the Converter, including any custom ConversionOptions or rendering settings.

With this information we can reproduce the scenario and determine the appropriate configuration or workaround. Please share the details here, and we’ll continue the investigation in this thread.

Source and target formats:
HTML → PDF

GroupDocs.Conversion.CrossPlatform Version:
24.12.0

Code snippet:

var converter =
    new Converter(     
        () => new MemoryStream(Encoding.UTF8.GetBytes("<html><body>Test html</body></html>")),   
        loadOptions: (LoadContext _) => new WebLoadOptions(),
        () => new ConverterSettings());

var convertOptions = new GroupDocs.Conversion.Options.Convert.PdfConvertOptions();

Action<ConvertedContext> onCompleted = context =>
{
    context.ConvertedStream.CopyTo(convertedStream);
    convertedStream.Position = 0;
};

converter.Convert(
    convertOptions: convertOptions,
    documentCompleted: onCompleted,
    cancellationToken: default
);