The version of the native libSkiaSharp library is incompatible with this version of SkiaSharp

I am getting below error while converting doc to PDF using DocIORenderer. Below is the list of packages installed in application.

- Syncfusion.XlsIORenderer.Net.Core

- Syncfusion.EJ2.WordEditor.AspNet.Core

Syncfusion.DocIORenderer.Net.Core


Error StackTrace:

Mssage: The version of the native libSkiaSharp library is incompatible with this version of SkiaSharp. Supported versions of the native libSkiaSharp library are in the range [88.0, 89.0)., StackTrace: at SkiaSharp.SKObject..ctor(IntPtr handle, Boolean owns)

   at SkiaSharp.SKBitmap..ctor(IntPtr handle, Boolean owns)

   at SkiaSharp.SKBitmap..ctor()

   at SkiaSharp.SKBitmap..ctor(SKImageInfo info, Int32 rowBytes)

   at SkiaSharp.SKBitmap..ctor(SKImageInfo info)

   at SkiaSharp.SKBitmap..ctor(Int32 width, Int32 height, SKColorType colorType, SKAlphaType alphaType)

   at Syncfusion.Drawing.SkiaSharpHelper.Image..ctor(Int32 width, Int32 height)

   at Syncfusion.Drawing.SkiaSharpHelper.Bitmap..ctor(Int32 width, Int32 height)

   at Syncfusion.DocIORenderer.RenderHelper.GetBitmap(Int32 width, Int32 height)

   at Syncfusion.DocIO.Rendering.DrawingContext.CreateBitmap(Int32 width, Int32 height)

   at Syncfusion.DocIO.Rendering.DrawingContext..ctor()

   at Syncfusion.DocIORenderer.DocIORenderer.ConvertToPDF(WordDocument wordDocument)

   at Capstone2.RestServices.Syncfusion.Services.SyncfusionBAL.ConvertSFDToPDF(String data) in /home/AzureLinux/agent/_work/21/s/Capstone2.RestServices.Syncfusion/Services/SyncfusionBAL.cs:line 80

   at Capstone2.RestServices.Syncfusion.Controllers.SyncfusionController.ConvertSFDToPDF(String data) in /home/AzureLinux/agent/_work/21/s/Capstone2.RestServices.Syncfusion/Controllers/SyncfusionController.cs:line 183

   at lambda_method99(Closure , Object )

   at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)

   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Logged|12_1(ControllerActionInvoker invoker)

   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)

   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)

   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)

   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()

--- End of stack trace from previous location ---

   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)


1 Reply

SB Suriya Balamurugan Syncfusion Team September 26, 2022 05:52 PM UTC

Hi Dnyaneshwar,

From the given details, we have found that you are using our latest version of Syncfusion NuGet packages and the older version of dependent NuGet packages (SkiaSharp.NativeAssets.Linux and HarfBuzzSharp.NativeAssets.Linux) to perform Word document to PDF conversion in your application in Linux environment. So, the reported issue occurs at your end.

To resolve the reported issue, From v20.1.0.x, we recommend you to install the SkiaSharp.NativeAssets.Linux v2.88.0-preview.209 and HarfBuzzSharp.NativeAssets.Linux v2.8.2-preview.209 NuGet packages in the mentioned version along with latest Syncfusion.DocIORenderer.Net.Core NuGet while performing Word to PDF conversion in a Linux environment and let us know whether it is working fine on your side.

Please find the NuGet packages to be installed to perform Word to PDF conversion in Linux OS from below,

https://help.syncfusion.com/file-formats/docio/faq#what-are-the-nuget-packages-to-be-installed-to-perform-word-to-pdf-conversion-in-linux-os

For your reference, we have prepared the sample application to perform Word to PDF conversion in a Linux environment and it can be downloaded from the below attachment.

Regards,
Suriya Balamurugan.

If this post is helpful, please consider accepting it as the solution so that other members can locate it more quickly.


Attachment: WordToPDFDockerSample_257e7aa0.zip

Loader.
Up arrow icon