There are two ways to do this. For each font that you want to insert as follows:
var options = new XPdfFontOptions(PdfFontEmbedding.Always); var font = new XFont("Times New Roman", 12, XFontStyle.Regular, options);
Then, if you use a font, it will be embedded.
If you want all fonts to be used on the embedded page, you can do this as follows:
var page = new PdfPage(); var gfx = XGraphics.FromPdfPage(page); gfx.MFEH = PdfFontEmbedding.Automatic;
The second approach will work for any fonts used in the MigraDoc code.
Ian schmits
source share