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)
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:
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.
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.
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.
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
@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.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.