We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Docx to html conversion crashes in docker environment

We are using Aspose.Words for .NET to convert docx files to html. This works in a windows environment, but produces errors when run in a linux docker environment.

Find attached a Visual Studio 2017 solution and docker file that show this problem.
Steps to reproduce:
On windows)

  • build solution
  • run application
  • message “success save html” shown (OK)
  • build image using dockerfile
  • start container in linux environment
  • call application and see error message (Bug)

HTML_Docker_Error.zip (1.1 MB)


Please note that .NET Standard 2.0 version of Aspose.Words uses SkiaSharp to deal with graphics. To make it work in Linux container it is required to add Linux native Skia library. Please add reference to SkiaSharp.NativeAssets.Linux .

We were able to resolve the issue. Apparently the binaries in the SkiaSharp.NativeAssets.Linux-Nuget-Package are not compatible with the linux distribution used in the image. We build SkiaSharp ourselves and the error no longer occurs.

It’s a bit unfortunate that this is necessary for microsoft’s .net core images.


It is nice to hear from you that your problem has been solved. Please feel free to ask if you have any question about Aspose.Words, we will be happy to help you.