【发布时间】:2017-06-07 09:39:18
【问题描述】:
使用此代码,我总是在每一页上获得相同的页码。如何解决这个问题?
static void DefineContentSection(Document document)
{
Section section = document.AddSection();
section.PageSetup.OddAndEvenPagesHeaderFooter = true;
section.PageSetup.StartingNumber = 1;
Paragraph paragraph = new Paragraph();
paragraph.AddText("Page ");
paragraph.AddPageField();
paragraph.AddText(" of ");
paragraph.AddNumPagesField();
section.Footers.Primary.Add(paragraph);
section.Footers.EvenPage.Add(paragraph.Clone());
}
【问题讨论】:
标签: c# pdfsharp migradoc page-numbering