byte[] data = File.ReadAllBytes("verdana.ttf");
FontFamily verdanaRegularFontFamily = new FontFamily("Verdana");
FontsRepository.RegisterFont(verdanaRegularFontFamily, FontStyles.Normal, FontWeights.Normal, data);
FontsRepository.TryCreateFont(verdanaRegularFontFamily, out FontBase verdanaRegularFont);
foreach (RadFixedPage page in mergedDocument.Pages)
{
foreach (TextFragment textFragment in page.Content.Where(c => c is TextFragment).Cast<TextFragment>())
{
textFragment.Font = verdanaRegularFont;
}
}
Here is a sample structure of the signature:
/Type /Sig /SubFilter /adbe.x509.rsa_sha1 /Filter /Adobe.PPKMS
Corrupted document when exporting "Courier New" subset.
Workaround - fully embed the font:
var pdfFormatProvider = new PdfFormatProvider();
pdfFormatProvider.ExportSettings.FontEmbeddingType = FontEmbeddingType.Full;NOTE: There are reports for other fonts' subset, e.g. "ZapfDingbats" font.
NetStandard: Missing content due to empty glyph outlines in embedded TrueType font subsets.
Fully embed the fonts in the result PDF document:
PdfFormatProvider pdfFormatProvider = new PdfFormatProvider();
pdfFormatProvider.ExportSettings.FontEmbeddingType = FontEmbeddingType.Full;Workaround 2
Switch to a .NET Framework project environment and use the .NET Framework PdfProcessing packages.
PdfStreamWriter stream-copy page splitting performance is much slower than expected in some cases. When working with larger PDF files, the processing time can increase a lot and cause noticeable delays.