Duplicated
Last Updated: 15 Sep 2025 06:44 by ADMIN
David
Created on: 15 Sep 2025 05:24
Category: PdfProcessing
Type: Bug Report
1
PdfProcessing: Unable to show text in generated pdf if the font (e.g. Courier New) is registered

Registering the font used to be enough for resolving the font's characters in .NET Standard

			byte[] fontData = File.ReadAllBytes(".\\files\\cour.ttf");
			FontFamily courierNewFont = new FontFamily("Courier New");
			FontsRepository.RegisterFont(courierNewFont, FontStyles.Normal, FontWeights.Normal, fontData);

However, as of  version 2024.2.426 registering the font doesn't produce the correct result anymore and the text got missing in the PDF fields. When the document is opened in Adobe, the following message appears: 

The FontsProvider works in both versions (before and after 2024.2.426). It is also required to iterate all widgets and apply the font explicitly to the widget.TextProperties.Font property.

Duplicated
This item is a duplicate of an already existing item. You can find the original item here:
0 comments