PDFsharp & MigraDoc 项目地址:http://www.pdfsharp.net
下载地址:
PDFsharp 1.3.2
自定义字体:
System.Drawing.Text.PrivateFontCollection pfc = new System.Drawing.Text.PrivateFontCollection();
string strFontPath = HttpContext.Current.Server.MapPath("123.ttf");
pfc.AddFontFile(strFontPath);
XPdfFontOptions options = new XPdfFontOptions(PdfFontEncoding.Unicode, PdfFontEmbedding.Always);
XFont font1 = new XFont(pfc.Families[0], 15, XFontStyle.Regular, options);