Launch in operating systems other than windows
Leave feedback
Limitations
Because of the lack of Windows fonts in target OS (Android, macOS, Linux, etc), 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.
If GroupDocs.Watermark for .NET Standard is intended to be used in a Linux environment, an additional NuGet package should be referenced to make it work correctly with graphics: SkiaSharp.NativeAssets.Linux for Ubuntu (it also should work on most Debian-based Linux distributions) or Goelze.SkiaSharp.NativeAssets.AlpineLinux for Alpine Linux.
If the target framework is .NET 6, due to limitations in the System.Drawing.Common library in .NET 6 (see Microsoft documentation), you need to add the following setting to the .csproj file.
When using GroupDocs.Watermark in a non-Windows environment, the following packages should be installed to improve rendering results and prevent possible runtime errors:
libgdiplus - is the Mono library that provides a GDI+-compatible API on non-Windows operating systems.
libc6-dev - package contains the symlinks, headers, and object files needed to compile and link programs which use the standard C library.
ttf-mscorefonts-installer - package with Microsoft compatible fonts.
To install packages on Debian-based Linux distributions use apt-get utility:
sudo apt-get install libgdiplus
sudo apt-get install libc6-dev
sudo apt-get install ttf-mscorefonts-installer
How to run .net GroupDocs.Watermark in the Docker
Running GroupDocs.Watermark in Docker is straightforward. All you need to do is add the installation of the packages described in the previous paragraph to the docker file. An example beginning of the Dockerfile might look like this:
FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS baseWORKDIR /appEXPOSE 80# Add libgdiplus, libc6-devRUN apt-get update && apt-get install -y apt-utils libgdiplus libc6-dev# Add `contrib` archive area to package sources listRUN sed -i'.bak''s/$/ contrib/' /etc/apt/sources.list# Add fontsRUN apt-get update; apt-get install -y ttf-mscorefonts-installer fontconfigRUN fc-cache -f -v# etc
fontconfig: This library configures and customizes font access.
ttf-mscorefonts-installer: This package provides Microsoft TrueType core fonts. It’s available in the contrib archive area. (Note: Using non-free fonts may have licensing implications, so be sure to check the license terms.)
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.