简单修改了你一下函数中的代码,设置了FontName 为宋体,请参考:
- public TXTextControl.HeaderFooter SetTotalPageNumber(TXTextControl.HeaderFooter headerFooter)
- {
- headerFooter.Selection.FontName = "宋体";
- headerFooter.Selection.Text = " 共 页";
- headerFooter.Selection.FontSize = 12 * 15;
-
- headerFooter.Selection.Bold = true;
- headerFooter.Selection.Start = 9;
- headerFooter.Selection.Length = 0;
- TXTextControl.PageNumberField totalPages = new TXTextControl.PageNumberField();
- totalPages.Editable = false;
- totalPages.DoubledInputPosition = true;
- totalPages.ShowNumberOfPages = true;
- headerFooter.PageNumberFields.Add(totalPages);
- return headerFooter;
- }
复制代码 |