Aspose.Tex on linux fails

Aspose.Tex depends on system.drawing.common still and so fails on linux

Unhandled exception: System.PlatformNotSupportedException: System.Drawing.Common is not supported on this platform.
at System.Drawing.Drawing2D.GraphicsPath…ctor()
at #=zE1ZyUobbWpP$DC_rJsRqcfaJgr5dpd7x3oaxhw4=…ctor()
at #=z5YoZ4sBi6oXvsmREakz4wWOhZ1hG…ctor(Stream #=zXAgRkhs=, Device #=zloGvoSA=, TeXOptions #=zv2YcrK8=)
at #=zBOYmFuvjWIpURmxGMY8ajUJ4jmjltmIaBvoEJLUOyeZa.#=z$Y6rXS8=(Stream #=zXAgRkhs=, Device #=zloGvoSA=, TeXOptions #=zv2YcrK8=)
at Aspose.TeX.TeXJob…ctor(Stream stream, Device device, TeXOptions options)

@mcentaggart

It seems that you are encountering an issue with Aspose.Tex on Linux due to its dependency on the System.Drawing.Common library, which is not supported on non-Windows platforms. This results in the System.PlatformNotSupportedException error you are seeing.

To resolve this issue, it is recommended to migrate from System.Drawing.Common to the Aspose.Drawing library. Aspose.Drawing is a cross-platform graphics library that does not rely on third-party native libraries, ensuring consistent rendering results across different operating systems, including Linux.

Here are the steps you can follow to replace System.Drawing.Common with Aspose.Drawing in your project:

  1. Update Project References: Change your project references from System.Drawing.Common to Aspose.Drawing. This can typically be done in your project file or through your package manager.

  2. Recompile Your Application: After updating the references, recompile your application. The Aspose.Drawing library maintains a similar API, so you should not need to make significant changes to your existing code.

  3. Testing: Once recompiled, test your application on Linux to ensure that it functions correctly without the previous exceptions.

By following these steps, you should be able to eliminate the platform compatibility issues and continue using Aspose.Tex effectively on Linux.

For more detailed guidance on the migration process, you can refer to the Aspose documentation on replacing System.Drawing.Common with Aspose.Drawing.

Sources:
[1]: System.Drawing.Common (System.Drawing) replacement - Aspose Documentation

It is the Aspose.tex code that is referencing the System.Drawing.Common library so even if I reference Aspose.Drawing Aspose.tex still looks for System.Drawing.Common library

@Professionalize.Discourse,
This guid is for Aspose developers in order to build libarries with Aspose.Drawing instead of System.Drawing.Common

@mcentaggart ,
Yes, Aspose.TeX for .NET doesn’t support working on Linux yet. The task for creating the library with such support is planned on 2025’H2.

I am not familiar with H2, as a date nomenclature - is that 2nd half?

Yes, the second half of 2025.