BoldDesk®Customer service software offering ticketing, live chat, and omnichannel support, starting at $49/mo. for 10 agents. Try it for free.
Hi,
we are trying to use DocIO and Syncfusion.DocIORenderer.Net.Core to convert a word document to a PDF.
Our development environment is a Windows 10 machine and our production environment a Linux docker image.
We know that for a Linux environment we need to install the package SkiaSharp.NativeAssets.Linux (as written here NuGet Packages Required | Syncfusion)
On the windows machine, all is fine. Running the docker image we receive an error:
DllNotFoundException: Unable to load shared library 'libSkiaSharp' or one of its dependencies
Do we need to add some other configurations to run the application on Linux?
Thanks.
I've found the solution to this problem. I hope can be useful for others.
SkiaSharp.NativeAssets.Linux needs a specific library installed on Linux: libfontconfig1.
You just need to add the following line to the Dockerfile:
RUN apt-get update && apt-get install -y libfontconfig1
This does prevent the runtime errors but I still seem to be losing a lot of features regarding the fonts such as the actual fonts and bullets are also missing.
I've tries both of these approaches
https://github.com/mono/SkiaSharp/issues/1312
https://www.nuget.org/packages/SkiaSharp.NativeAssets.Linux.NoDependencies/
Has anyone managed to get it working with a linux container without losing these functionalities?
Hi Tan,
The reason for the problem is that the required fonts are not available in the Docker Linux environment. Kindly ensure that the necessary fonts used in the Word document are installed in your environment. You can check for missing fonts using the font substitution event.
To resolve the problem, please install the necessary fonts used in the Word document by referring to the documentation below:
FAQ about using DocIO in Linux | DocIO | Syncfusion®
Refer the below documentation to resolve the font preservation issues
How to resolve font problems during Word to PDF or image conversion?
Regards,
Sivakumar. A