While trying to generate PDF with html string we get the exception: The type initializer for ‘Gdip’ threw exception
It was mentioned that it is fixed in version 22.6, we have 22.12 (Skia 2.88.3)
new Aspose.Pdf.Document(
new MemoryStream(System.Text.Encoding.UTF8.GetBytes(htmlText)),
new Aspose.Pdf.HtmlLoadOptions (ResourcesDirectoryPath)
);
On windows that code works perfectly.
Need urgent help and/or workaround (we bought new license for new version and new version looks broken).
Aspose.PDF.Drawing NuGet package was released, DLL in this package doesn’t have System.Drawing.Common dependency.
You only need to install Aspose.PDF.Drawing instead of Aspose.PDF. Aspsoe.PDF with Drawing contains Aspose.Drawing inside, installing neither System.Drawing nor Aspose.Drawing is required.
This assembly correctly works under Linux environment. It will be published as separated assembly until we sure that this works absolutely perfect and may replace current System.Drawing-based assembly by 100%. When we ensure that, we will replace System.Drawing version with Aspose.Drawing one.