我做一个转换
document.Objects.Clear();
document.GlobalSettings.PaperSize = PaperKind.A4;
document.Objects.Add(new ObjectSettings
{
HtmlText = xml,
HeaderSettings = new HeaderSettings { HtmlUrl = headerPath, RightText = "[page]/[sitepages]", ContentSpacing = 10 },
FooterSettings = new FooterSettings { HtmlUrl = headerPath, RightText = "[page]/[sitepages]" },
});
并且 HTML 在页脚中可见,但在页眉中它位于页面之外。看起来它试图将页眉放在前一页上,这就是它的距离。