Versions after 8.6.0 - October 30, 2026:
The below steps are tested with Ubuntu 26.04.1 in Windows Terminal (WSL - Windows Bash) with DocumentUltimate AspNetCoreCS example project.
You can also add the same commands to a docker Linux container, by prefixing the commands with RUN
1. Install the .NET SDK (it also includes the .NET Runtime for same version):
sudo apt-get update && \
sudo apt-get install -y dotnet-sdk-10.0
2. Install native dependencies for System.Drawing.Common as conversion and viewing for some document formats (e.g. Excel files) still depend on it as of current version:
sudo apt install libgdiplus
Note that starting with DocumentUltimate v8.6.0, we intentionally use 5.0.3 version of System.Drawing.Common nuget package because Microsoft decided to make this package "Windows only" in 6.0.0 and higher. It turns out PlatformNotSupportedException was being thrown in net6.0+ projects (e.g. net8.0 or net10.0) not from the runtime but from the DLLs in the 6.0.0 package itself. So as long as we stay at 5.0.3, we can still use libgdiplus on Linux/MacOS, we don't even need System.Drawing.EnableUnixSupport config option in our project.
If you also have a separate dependency in your project to System.Drawing.Common nuget package (via <PackageReference>), make sure it's kept at 5.0.3 as maximum (don't cause nuget to upgrade your project's dependency version).
3. Install some common fonts (especially Microsoft TrueType fonts) so that DocumentViewer and conversions to PDF, display accurate text:
sudo apt-get install -y ttf-mscorefonts-installer
Some international fonts (e.g. asian), if you will have them in your documents:
sudo apt-get install -y \
ttf-wqy-zenhei \
fonts-arphic-ukai \
fonts-arphic-uming \
fonts-ipafont-mincho \
fonts-ipafont-gothic \
fonts-unfonts-coreYou can use ls command to check/list installed system fonts:
ls /usr/share/fonts/truetype/msttcorefonts
ls /usr/share/fonts/truetype
If you still have font issues (wrong font, missing characters) when viewing or converting in DocumentUltimate after installing above fonts, you can copy the necessary/additional font files to /usr/local/share/fonts
For example, use this command to copy your fonts (that you collect e.g. in your Project/Fonts folder) to a docker Linux container:
COPY ["Project/Fonts/*.*", "/usr/local/share/fonts/"]
4. Now you are ready to run your project with dotnet run
Older Versions:
The below steps are tested on Ubuntu 24.04.1 LTS (on Windows Bash) with DocumentUltimate AspNetCoreCS example project.
However you can add the same commands to a docker Linux container, by prefixing the commands with RUN
1. Install the .NET SDK (it also includes the .NET Runtime for same version):
sudo apt-get update && \
sudo apt-get install -y dotnet-sdk-8.0
a. Note that Microsoft no longer supports installing older versions of SDK or Runtime via apt-get packages. So for example, if your project target framework is net6.0, you should install it manually with script method provided by Microsoft:
wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh
chmod +x ./dotnet-install.sh
./dotnet-install.sh --channel 6.0
b. As we used the script method, edit bash profile file in your home directory, i.e. the file ~/.bashrc and added these lines for being able to access dotnet commands (or if you run the lines in terminal, the env variables will exist until your terminal is closed):
export DOTNET_ROOT=$HOME/.dotnet
export PATH=$PATH:$DOTNET_ROOT:$DOTNET_ROOT/tools
Ref:
c. As we used the script method, we need to add .NET dependencies manually, for example for Ubuntu:
sudo apt-get update \
&& sudo apt-get install -y --no-install-recommends \
libc6 \
libgcc-s1 \
libicu74 \
libssl3 \
libstdc++6 \
zlib1g Ref:
2 . Install fonts so that DocumentViewer and conversions to PDF, display accurate text:
sudo apt-get install -y \
ttf-mscorefonts-installer \
ttf-wqy-zenhei \
fonts-arphic-ukai \
fonts-arphic-uming \
fonts-ipafont-mincho \
fonts-ipafont-gothic \
fonts-unfonts-coreYou can use ls command to check/list system fonts:
ls /usr/share/fonts/truetype/msttcorefonts
ls /usr/share/fonts/truetype
If you still have font issues (wrong font, missing characters) after installing above fonts, you can copy the necessary/additional font files to /usr/local/share/fonts
For example, use this command to copy your fonts to a docker Linux container:
COPY ["Project/Fonts/*.*", "/usr/local/share/fonts/"]
3. Install System.Drawing.Common dependencies as some conversions (e.g. Excel files) still depend on it as of current version:
sudo apt install libgdiplus
Microsoft decided to make package System.Drawing.Common "Windows only" in .NET 6 and higher.
Note: We mistakenly upgraded System.Drawing.Common dependency to 6.0.0 first in DocumentUltimate v7.4.0 - March 8, 2025 so if your app is using NET 7.0 or higher, the below fix will still not prevent PlatformNotSupportedException, upgrade to DocumentUltimate v8.6.0 - October 30, 2026 to fix it (which uses System.Drawing.Common 5.0.3). .
So you need to opt-in to be able to use System.Drawing.Common package on Linux.
Edit your project's .csproj file and add these lines:
<ItemGroup>
<RuntimeHostConfigurationOption Include="System.Drawing.EnableUnixSupport" Value="true" />
</ItemGroup>
4. Now you are ready to run your project with dotnet run