From f7035cc851ddc5364c7cae21791a791bcaee36a2 Mon Sep 17 00:00:00 2001 From: KarthikaSF4773 Date: Wed, 22 Oct 2025 21:56:14 +0530 Subject: [PATCH 1/5] 988484-LinuxUG --- .../Excel/Excel-Library/NET/Linux.md | 80 +++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 Document-Processing/Excel/Excel-Library/NET/Linux.md diff --git a/Document-Processing/Excel/Excel-Library/NET/Linux.md b/Document-Processing/Excel/Excel-Library/NET/Linux.md new file mode 100644 index 000000000..4e690826e --- /dev/null +++ b/Document-Processing/Excel/Excel-Library/NET/Linux.md @@ -0,0 +1,80 @@ +--- +title: FAQ about using XlsIO in Linux | Syncfusion +description: This page explains about the frequently asked questions about using the .NET Excel (XlsIO) library in Linux environment. +platform: document-processing +control: XlsIO +documentation: UG +--- + +# Frequently asked questions about using XlsIO in Linux + +The frequently asked questions about using XlsIO in Linux environment are listed below. + +## How to copy necessary fonts to Linux containers? + +Excel to PDF conversion on Linux relies on system fonts available inside the container. By default, only a limited set is installed. Copy the required fonts to "/usr/local/share/fonts/" and refresh the font cache so they are used during conversion. Refer to the steps below to copy fonts. + +**Steps:** + +Step 1: Create a **Fonts** folder inside your project (or next to the solution). +Step 2: Place the required TrueType/OpenType font files (.ttf/.otf) in that folder. +Step 3: Add the following to your Dockerfile to install font support, copy fonts, and refresh the cache. + +{% tabs %} + +{% highlight Dockerfile %} + +# Install native font support +RUN apt-get update && apt-get install -y --no-install-recommends \ + fontconfig \ + libfreetype6 \ + libpng16-16 \ + libexpat1 \ + libuuid1 \ + && rm -rf /var/lib/apt/lists/* + +# Copy fonts from your project into the container +COPY ["ProjectName/Fonts/*.*", "/usr/local/share/fonts/"] + +# Refresh the font cache so the new fonts are recognized +RUN fc-cache -f -v + +{% endhighlight %} + +{% endtabs %} + +You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/XlsIO-Examples/tree/master/Linux/Copy%20fonts%20to%20linux%20containers/.NET/Copy_fonts_to_linux_containers). + +## How to set culture/locale in Docker containers (Windows and Linux)? + +By default, Culture/Locale that is specified in the container image will be used in Docker containers. + +If you want to change or set Culture/Locale in the Docker container, set the required Culture/Locale in Docker file. + +T> We recommend you check whether the required Culture/Locale is set to the Docker containers since some Docker container may not have Culture/Locale. + +The following code example will set en_US locale to the container by setting Language to en_US. + +{% tabs %} + +{% highlight Dockerfile %} +ENV LANG="en_US.UTF-8" +{% endhighlight %} + +{% endtabs %} + +## How to resolve LibSkiaSharp not found exception? + +This exception occurs when required native dependencies are missing. Ensure the necessary packages are installed by adding this to your Docker file: + +{% tabs %} + +{% highlight Dockerfile %} +RUN apt-get update -y && apt-get install libfontconfig -y +{% endhighlight %} + +{% endtabs %} + +In production environment (hosted server machine), ensure whether the Visual C++ Redistributable is properly installed. + +[Download](https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170) and install Visual C++, if not installed. \ No newline at end of file From f6eca9633471a2f7093a6a3427b1a2272a8fd637 Mon Sep 17 00:00:00 2001 From: KarthikaSF4773 Date: Wed, 22 Oct 2025 22:25:59 +0530 Subject: [PATCH 2/5] 988484-LinuxUG --- Document-Processing/Excel/Excel-Library/NET/Linux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Document-Processing/Excel/Excel-Library/NET/Linux.md b/Document-Processing/Excel/Excel-Library/NET/Linux.md index 4e690826e..7054c9b96 100644 --- a/Document-Processing/Excel/Excel-Library/NET/Linux.md +++ b/Document-Processing/Excel/Excel-Library/NET/Linux.md @@ -43,7 +43,7 @@ RUN fc-cache -f -v {% endtabs %} -You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/XlsIO-Examples/tree/master/Linux/Copy%20fonts%20to%20linux%20containers/.NET/Copy_fonts_to_linux_containers). +You can download a complete working sample from GitHub. ## How to set culture/locale in Docker containers (Windows and Linux)? From 81385679df2978d52e64c7a5a806fce37b5350f4 Mon Sep 17 00:00:00 2001 From: KarthikaSF4773 Date: Thu, 23 Oct 2025 11:35:51 +0530 Subject: [PATCH 3/5] 988484-LinuxUG --- .../Excel/Excel-Library/NET/Linux.md | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/Document-Processing/Excel/Excel-Library/NET/Linux.md b/Document-Processing/Excel/Excel-Library/NET/Linux.md index 7054c9b96..ba462c83f 100644 --- a/Document-Processing/Excel/Excel-Library/NET/Linux.md +++ b/Document-Processing/Excel/Excel-Library/NET/Linux.md @@ -12,33 +12,20 @@ The frequently asked questions about using XlsIO in Linux environment are listed ## How to copy necessary fonts to Linux containers? -Excel to PDF conversion on Linux relies on system fonts available inside the container. By default, only a limited set is installed. Copy the required fonts to "/usr/local/share/fonts/" and refresh the font cache so they are used during conversion. Refer to the steps below to copy fonts. +Excel to PDF conversion on Linux relies on system fonts available inside the container. By default, only a limited set is installed. Copy the required fonts to "/usr/local/share/fonts/" before conversion. Refer to the steps below to copy fonts. **Steps:** Step 1: Create a **Fonts** folder inside your project (or next to the solution). Step 2: Place the required TrueType/OpenType font files (.ttf/.otf) in that folder. -Step 3: Add the following to your Dockerfile to install font support, copy fonts, and refresh the cache. +Step 3: Add the following to your Dockerfile to copy the fonts to the container. {% tabs %} {% highlight Dockerfile %} -# Install native font support -RUN apt-get update && apt-get install -y --no-install-recommends \ - fontconfig \ - libfreetype6 \ - libpng16-16 \ - libexpat1 \ - libuuid1 \ - && rm -rf /var/lib/apt/lists/* - -# Copy fonts from your project into the container COPY ["ProjectName/Fonts/*.*", "/usr/local/share/fonts/"] -# Refresh the font cache so the new fonts are recognized -RUN fc-cache -f -v - {% endhighlight %} {% endtabs %} From 26f173a83ad831f839ff2be0f490b456987a365c Mon Sep 17 00:00:00 2001 From: KarthikaSF4773 Date: Thu, 23 Oct 2025 19:01:19 +0530 Subject: [PATCH 4/5] 988484-LinuxUG --- .../Excel/Excel-Library/NET/Linux.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Document-Processing/Excel/Excel-Library/NET/Linux.md b/Document-Processing/Excel/Excel-Library/NET/Linux.md index ba462c83f..9fbca332d 100644 --- a/Document-Processing/Excel/Excel-Library/NET/Linux.md +++ b/Document-Processing/Excel/Excel-Library/NET/Linux.md @@ -32,6 +32,22 @@ COPY ["ProjectName/Fonts/*.*", "/usr/local/share/fonts/"] You can download a complete working sample from GitHub. +## How to install Microsoft compatible fonts on Linux? + +By default, Linux systems include a limited set of fonts located at "/usr/share/fonts/". For document conversion scenarios that require Microsoft-compatible fonts, you can install them using the following command: + +{% tabs %} + +{% highlight Kconfig %} +sudo apt-get install ttf-mscorefonts-installer +{% endhighlight %} + +{% endtabs %} + +After installation, the fonts will be available at "/usr/share/fonts/truetype/msttcorefonts", and will be used during conversion. + +N> Ensure you have obtained the appropriate license clearance from Microsoft before using these fonts in your environment. + ## How to set culture/locale in Docker containers (Windows and Linux)? By default, Culture/Locale that is specified in the container image will be used in Docker containers. From 738d6cf00b370aa26fc22ffda5695eaf767e0773 Mon Sep 17 00:00:00 2001 From: KarthikaSF4773 Date: Thu, 23 Oct 2025 20:14:49 +0530 Subject: [PATCH 5/5] 988484-LinuxUG --- .../Excel/Excel-Library/NET/Linux.md | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/Document-Processing/Excel/Excel-Library/NET/Linux.md b/Document-Processing/Excel/Excel-Library/NET/Linux.md index 9fbca332d..02affcac8 100644 --- a/Document-Processing/Excel/Excel-Library/NET/Linux.md +++ b/Document-Processing/Excel/Excel-Library/NET/Linux.md @@ -48,6 +48,38 @@ After installation, the fonts will be available at "/usr/share/fonts/truetype/ms N> Ensure you have obtained the appropriate license clearance from Microsoft before using these fonts in your environment. +## How to install necessary fonts in Linux containers? + +In Excel to PDF conversion, Essential® XlsIO uses the fonts installed in the production environment to measure and render text. If a required font is missing, an alternate font will be used based on the environment, which may affect layout fidelity. + +To ensure proper font preservation, install all fonts used in the Excel document within the container. + +Use the following code snippet to install fonts in containers. + +{% tabs %} + +{% highlight Dockerfile %} +RUN apt-get update -y && \ + apt-get install -y fontconfig debconf && \ + echo "ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true" | debconf-set-selections && \ + apt-get install -y \ + fonts-arphic-ukai \ + fonts-arphic-uming \ + fonts-ipafont-mincho \ + fonts-ipafont-gothic \ + fonts-unfonts-core \ + ttf-wqy-zenhei \ + ttf-mscorefonts-installer && \ + fc-cache -fv && \ + apt-get clean && \ + apt-get autoremove -y && \ + rm -rf /var/lib/apt/lists/* +{% endhighlight %} + +{% endtabs %} + +If font preservation issues persist after installing the required packages, you can manually copy the necessary font files into the container. + ## How to set culture/locale in Docker containers (Windows and Linux)? By default, Culture/Locale that is specified in the container image will be used in Docker containers.