1
4

1 回答 1

0

要向 PDF 添加页脚,您需要使用 Tuesspechkin API。

参见示例:

var document = new HtmlToPdfDocument
{
    GlobalSettings =
    {
        ProduceOutline = true,
        DocumentTitle = "My Website",
        PaperSize = PaperKind.A4,
        Margins =
        {
            All = 1.375,
            Unit = Unit.Centimeters
        }
    },
    Objects = {
        new ObjectSettings
        {
            HtmlText = "<h1>My Website</h1>",
            HeaderSettings = new HeaderSettings{CenterText = "I'm a header!"},
            FooterSettings = new FooterSettings{CenterText = "I'm a footer!", LeftText = "[page]"}
        }
    }
};

请注意允许您添加页脚的对象设置。页脚接受文本和 html。

于 2015-02-03T21:59:39.547 回答