C# 如何在NPOI-Docx中添加不同于默认页脚的第一页页脚?

C# 如何在NPOI-Docx中添加不同于默认页脚的第一页页脚?,c#,apache-poi,footer,docx,npoi,C#,Apache Poi,Footer,Docx,Npoi,我正在使用NPOI 2.5.2生成一个docx文件,我坚持使用页眉/页脚作为第一页。 我想有一个第一页的自定义页脚,并开始编号从第二页 以下是我的第一页页脚代码: // First page doc.Document.body.sectPr = new CT_SectPr(); var footer = new CT_Ftr(); var footerParagraph = footer.AddNewP(); footerParagraph.AddNewR().AddNewT().Value =

我正在使用NPOI 2.5.2生成一个docx文件,我坚持使用页眉/页脚作为第一页。 我想有一个第一页的自定义页脚,并开始编号从第二页

以下是我的第一页页脚代码:

// First page
doc.Document.body.sectPr = new CT_SectPr();
var footer = new CT_Ftr();
var footerParagraph = footer.AddNewP();
footerParagraph.AddNewR().AddNewT().Value = $"FIRST PAGE CUSTOM FOOTER";
var footerPar = new XWPFParagraph(footerParagraph, doc);
var parsFooter = new XWPFParagraph[1];
parsFooter[0] = footerPar;
var headerFooterPolicy = doc.GetHeaderFooterPolicy();
if (headerFooterPolicy == null)
    headerFooterPolicy = doc.CreateHeaderFooterPolicy();
headerFooterPolicy.CreateFooter(XWPFHeaderFooterPolicy.FIRST, parsFooter);
以下是带有页码的默认页脚的代码:

// Other pages
footerParagraph = footer.AddNewP();
footerParagraph.AddNewR().AddNewFldChar().fldCharType = ST_FldCharType.begin;
footerParagraph.AddNewR().AddNewInstrText().Value = " PAGE ";
footerParagraph.AddNewR().AddNewFldChar().fldCharType = ST_FldCharType.separate;
footerParagraph.AddNewR().AddNewFldChar().fldCharType = ST_FldCharType.end;
footerPar = new XWPFParagraph(footerParagraph, doc);
parsFooter = new XWPFParagraph[1];
parsFooter[0] = footerPar;
headerFooterPolicy.CreateFooter(XWPFHeaderFooterPolicy.DEFAULT, parsFooter);
使用上面的代码,我看不到第一页的自定义页脚,而是每页的页码。我做错了什么

我在NPOI中找到了,但找不到
addNewTitlePg
方法

是否有关于NPOI的适当文档和示例