I’m having a problem with generating PDF document from WORD document on .NET Core 2.1 running on dotnet-21-rhel image (RedHat Enterprise Linux).
In word document there is an image that it missing after generating PDF document.
Warning from WarningCallback (Document.WarningCallback):
“DrawingML picture rendering failed with exception:'The type initializer for ‘ ’ threw an exception.’”
If Aspose.Words for .NET Standard is intended to be used in Linux environment, an additional NuGet package should be referenced to make it work correctly with graphics: SkiaSharp.NativeAssets.Linux for Ubuntu (it also should work on most Debian-based Linux distributions) or Goelze.SkiaSharp.NativeAssets.AlpineLinux for Alpine Linux. Hope, this helps.
I tried both packages, but the same problem remained.
We are using Redhat Enterprise Linux images, and I searched NuGet for another NativeAssets package but there is nothing else.
Do you see this problem with one particular document or every Word document (containing images) you try to convert to PDF cause the same problem?
Please also ZIP and attach your sample input Word document and Aspose.Words generated PDF file (if any) here for testing. We will then investigate the issue on our end and provide you more information.
We will also check and may provide another SkiaSharp Native Asset Package for Redhat Enterprise Linux. We have logged this problem in our issue tracking system. Your ticket number is WORDSNET-19073. We will further look into the details of this problem and will keep you updated on the status of the linked issue. We apologize for any inconvenience.
You can also vote for RHEL build (i.e. RHEL 6/7 (x64) option)… We will monitor the progress on this issue. We will revisit WORDSNET-19073 after when they provide support for RHEL 6/7 (x64).
Recently SkiaSharp release new version 1.68.1. With this version new native assets package was released - SkiaSharp.NativeAssets.Linux.NoDependencies. I tested this native assets package with dotnet-21-rhel7 image and it works fine. Images are not missed from the document upon conversion to PDF. Also conversion document to images works fine.
So, I close the issue you have reported. We updated Aspose.Words to use newer version of SkiaSharp.