是否可以隐藏特定页面的 TuesPechkin 文档的页眉/页脚。我希望在 PDF 文档的第一页上忽略页眉和页脚,但找不到实现此目的的方法。
文件设置如下:
var document = new HtmlToPdfDocument
{
GlobalSettings =
{
ProduceOutline = true,
DocumentTitle = "My Report",
PaperSize = PaperKind.A4, // Implicit conversion to PechkinPaperSize
Margins =
{
All = 1.375,
Unit = Unit.Centimeters
}
},
Objects =
{
new ObjectSettings
{
HtmlText = html,
WebSettings = new WebSettings {UserStyleSheet = "~/Content/Site.css"},
HeaderSettings = new HeaderSettings()
{
FontSize = 8,
LeftText = "My report",
RightText = "2014"
},
FooterSettings = new FooterSettings()
{
FontSize = 8,
CenterText = "Page [page] of [topage]"
}
}
}
};