.NET Standard Assembly Limitations

There are a couple of additional dependencies that should be installed when running on Linux:

  1. Windows Fonts - because of the lack of Windows fonts in Linux fonts used in documents are substituted with available fonts, this might lead to inaccurate document layout when rendering the document to PNG, JPG, and PDF.

  2. SkiaSharp Native Assets - SkiaSharp.NativeAssets.Linux.NoDependencies 2.80.2 or higher

  3. System.Drawing dependencies - libgdiplus 6.0.1 or higher

    Warning
    You can install the latest version of libgdiplus by adding the Mono repository to your system. See more at https://www.mono-project.com/download/stable/#download-lin.

How to install the dependencies

To install packages on Debian (Buster) based Linux distributions use apt-get utility:

  1. Windows Fonts

     apt-get update
     apt-get install -y libfontconfig1
     apt-get install -y ttf-mscorefonts-installer
    
  2. SkiaSharp - add package to your project

    dotnet add package SkiaSharp.NativeAssets.Linux.NoDependencies --version 2.80.3
    
  3. System.Drawing dependencies

    apt-get update
    apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
    echo "deb https://download.mono-project.com/repo/ubuntu stable-buster main" >> /etc/apt/sources.list.d/mono-official-stable.list
    
    apt-get update
    apt-get install -y gnupg
    apt-get install -y libgdiplus