Hello, I have recently upgraded my .Net project from Core 3.1 to .Net 6, and my GroupDocs.Conversion version from 20.9.3 to 22.2. I also switched my OS from Windows to Linux, which meant I had to start including libgdiplus in my install
Both 22.1 and 22.2 are working fine in all scenarios but one: Converting DOCX to PNG throws an error:
Unhandled Exception: GroupDocs.Conversion.Exceptions.GroupDocsConversionException: The type initializer for ’ threw an exception.
at #002#005#003.#002()
at GroupDocs.Conversion.Converter.#002()
at GroupDocs.Conversion.Converter.Convert(SaveDocumentStream document, ConvertedDocumentStream documentCompleted, ConvertOptions convertOptions)
Converting from DOCX to PDF works fine - the error is only for pngs.
I believe this is the same issue this post except for PNGs instead of PDFs:
This makes sense as the PDF issue was apparently fixed in version 21.11 under the following id:
Make sure you configured/installed libgdiplus like this
This is not Ubuntu. There is no apt-get and there is no yum package called ttf-mscorefonts-installer. What’s the alternative for Amazon Linux? (which I think is redhat. I don’t usually work with Linux)
On Windows, you are trying to convert the Word file to PNG using .NET 6 app? Could you please share a simple console application using that issue could be reproduced?
Hi Atir, I apologize. I got to the root of the problem when I tried to reproduce it in a console app. It turns out that we were including an old version of libSkiaSharp.dll in our project output. It took me 2 days to find it, but once it was removed everything worked fine. Thank you for your help!