Free Support Forum - aspose.com

Document containing image does not convert to PDF at Alpine Linux using Core 3.0

I want to run Aspose.Words in Alpine Linux where the intent is to convert a document from docx to pdf/a-1b

I have followed this:
https://docs.aspose.com/display/wordsnet/How+to+Run+Aspose.Words+in+Docker

I can convert a document without image fine, but I cannot convert Word documents with images.

I read the part about SkiaSharp and I have added the library Goelze.SkiaSharp.NativeAssets.AlpineLinux as you suggested.

It still does not work and gives the following error:
The type initializer for ‘SkiaSharp.SKAbstractManagedStream’ threw an exception.\n —> System.EntryPointNotFoundException: Unable to find an entry point named ‘sk_managedstream_set_procs’ in shared library ‘libSkiaSharp’.\n at SkiaSharp.SkiaApi.sk_managedstream_set_procs(SKManagedStreamDelegates procs)\n at SkiaSharp.SKAbstractManagedStream…cctor()\n

Exception occured while processing request. Exception message: The type initializer for 'SkiaSharp.SKAbstractManagedStream' threw an exception.
at SkiaSharp.SKAbstractManagedStream..ctor(Boolean owns), at SkiaSharp.SKManagedStream..ctor(Stream managedStream, Boolean disposeManagedStream), at SkiaSharp.SKCodec.WrapManagedStream(Stream stream),

I am using Aspose.Words v20.2.0

Can you please look into this?

Thank you for reporting this problem to us. I managed t reproduce the problem on my side and logged it in our bug tracking system as defect WORDSNET-19977. The reason of the problem is that Goelze.SkiaSharp.NativeAssets.AlpineLinux package is built against SkiaSharp 1.68.0, but the latest Aspose.Words release uses 1.68.1.1 versions of SkiaSharp, which seems to be not compatible with Goelze.SkiaSharp.NativeAssets.AlpineLinux package.

As a simple workaround, you can use Aspose.Words 19.11.0 instead of 20.2.0. This version uses SkiaSharp 1.68.0.

Hope this helps.

Hello.

I can confirm this version works OK.

We need a better permanent solution though, so future upgrades of Aspose won’t require research on what SkiaSharp nuget package and version it needs.

@mga Thank you for the confirmation. Sure we will work on this issue with SkiaSharp team and let you know once it is resolved.

Hello.

We have lately seen a memory leak issue that is fixed in newest version of Aspose. However, we then run into this issue again.

What is the suggested steps to be able to use Aspose.Words version 20.5.0?

Also, what version of SkiaSharp is 20.5.0 built against?

@mga
The latest version of Aspose.Words (20.5.0) still uses the same versions 1.68.1 version of SkiaSharp. But I found another build of SkiSharp native assets, which is compatible with SkiaSharp 1.68.1 StoneCold.SkiaSharp.NativeAssets.AlpineLinux. I checked it and it works fine on my side with Aspose.Words 20.5.0. Please let me know in case of any issues.

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