Hi!
How can I make a custom font work, when importing a HTML string and printing it to pdf? Im loosing the "ÄÖÜ" characters currently and know that this is a font related issue.
var htmlDocument = new Telerik.Windows.Documents.Flow.FormatProviders.Html.HtmlFormatProvider();
// Regular Font
byte[] fontData = System.IO.File.ReadAllBytes("fonts/verdana.ttf");
Telerik.Documents.Core.Fonts.FontFamily fontFamily = new Telerik.Documents.Core.Fonts.FontFamily("CustomVerdana");
FontsRepository.RegisterFont(fontFamily, FontStyles.Normal, FontWeights.Normal, fontData);
var doc = htmlDocument.Import("<html><body style=\"font-family:CustomVerdana;\">Das ist ein test. <br> <strong>ÖOÜUÄA</strong></body></html>");
var fileName = "output.pdf";
var pdf = new Telerik.Windows.Documents.Flow.FormatProviders.Pdf.PdfFormatProvider();
using (Stream output = System.IO.File.OpenWrite(fileName))
{
pdf.Export(doc, output);
}