Skip to content

Commit 738d6cf

Browse files
988484-LinuxUG
1 parent 26f173a commit 738d6cf

File tree

1 file changed

+32
-0
lines changed
  • Document-Processing/Excel/Excel-Library/NET

1 file changed

+32
-0
lines changed

Document-Processing/Excel/Excel-Library/NET/Linux.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,38 @@ After installation, the fonts will be available at "/usr/share/fonts/truetype/ms
4848

4949
N> Ensure you have obtained the appropriate license clearance from Microsoft before using these fonts in your environment.
5050

51+
## How to install necessary fonts in Linux containers?
52+
53+
In Excel to PDF conversion, Essential<sup>&reg;</sup> 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.
54+
55+
To ensure proper font preservation, install all fonts used in the Excel document within the container.
56+
57+
Use the following code snippet to install fonts in containers.
58+
59+
{% tabs %}
60+
61+
{% highlight Dockerfile %}
62+
RUN apt-get update -y && \
63+
apt-get install -y fontconfig debconf && \
64+
echo "ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true" | debconf-set-selections && \
65+
apt-get install -y \
66+
fonts-arphic-ukai \
67+
fonts-arphic-uming \
68+
fonts-ipafont-mincho \
69+
fonts-ipafont-gothic \
70+
fonts-unfonts-core \
71+
ttf-wqy-zenhei \
72+
ttf-mscorefonts-installer && \
73+
fc-cache -fv && \
74+
apt-get clean && \
75+
apt-get autoremove -y && \
76+
rm -rf /var/lib/apt/lists/*
77+
{% endhighlight %}
78+
79+
{% endtabs %}
80+
81+
If font preservation issues persist after installing the required packages, you can manually copy the necessary font files into the container.
82+
5183
## How to set culture/locale in Docker containers (Windows and Linux)?
5284

5385
By default, Culture/Locale that is specified in the container image will be used in Docker containers.

0 commit comments

Comments
 (0)