Word to Pdf image missing on Redhat Enterprise Linux - DrawingML exception (provide another SkiaSharp Native Asset Package for Redhat Enterprise Linux)

Greetings,

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.’”

Environment:

  • .NET Core SDK 2.1.302
  • Container image: dotnet-21-rhel7
  • Aspose.Words: 19.8.0 (NuGet package)

@veran.pokornic,

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 have maybe another solution?

@veran.pokornic,

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 tried multiple Word documents containing images and in every document after saving in PDF image is missing.

ZIP with input Word sample, and generated output PDF:
Aspose words - image missing sample.zip (3.9 MB)

@veran.pokornic,

I am afraid, we are unable to reproduce this issue when testing on Ubuntu 16.04 on our end. Please check the following PDF files:

Please make sure that you are using the latest version of Aspose.Words for .NET (19.8) and SkiaSharp.NativeAssets.Linux (1.68.0).

We have tested the scenario by using the following simple code:

Document doc = new Document("request.docx");
doc.Save("output.pdf");

@veran.pokornic,

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.

@awais.hafeez,

Thank you for the effort to resolve the issue and to provide new SkiaSharp.NativAsset package for Redhat Enterprise linux.

@veran.pokornic,

We have found following issue in SkiaSharp GIT:

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).

@awais.hafeez,

Thank you for finding the issue. I voted for RHEL option.

@veran.pokornic,

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.

The issues you have found earlier (filed as WORDSNET-19073) have been fixed in this Aspose.Words for .NET 20.1 update and this Aspose.Words for Java 20.1 update.

Alexey, thank you for the informations and update. I tested it too on rhel dotnet image, and everything works fine.

A post was split to a new topic: Word to Pdf image missing on Linux