This occurs with Aspose.PDF for .Net 22.6.0 running in a Linux container (Alpine) with .net Core 3.1. Just creating a new WatermarkArtifact value throws an error if Arial font is not installed.
Just using the following statement throws an error before any properties are even set.
The workaround is to install the font with the docker deployment but throwing an error when a WatermarkArtifact object is declared is still an issue.
This is the same as Issue setting watermark for pdf on Unix machine. Works on windows but is still an issue despite a workaround being found. This is one of a number of issues which occur when Aspose.PDF for .Net is used with a Linux container and not in a Windows environment.
var artifact = new WatermarkArtifact();
Font Arial was not found
at Aspose.Pdf.Text.FontRepository.FindFont(String fontName, Boolean ignoreCase)
at Aspose.Pdf.WatermarkArtifact.#=z9VmHVgA=()
at Aspose.Pdf.WatermarkArtifact..ctor()
at CREngland.CareerPdf.MainService.ApplyWatermark(WatermarkRequest request) in /app/MainService.cs:line 916