我正在使用 TuesPechkIn 将我的 html 转换为 PDF。我将配置设置如下:
我的问题是,我可以只删除 PDF 第一页的上边距吗?(基本上是包含横幅图像的封面)。有没有办法实现这一点。
var document = new HtmlToPdfDocument
{
GlobalSettings =
{
DocumentTitle = "My Report",
PaperSize = PaperKind.A4,
Margins =
{
Top = 1.25, //Need to make it as 0 for the first page
Left = 0.00,
Right = 0.00,
Bottom = 1.25,
Unit = TuesPechkin.Unit.Centimeters
},
PageOffset = 2
},
Objects =
{
new ObjectSettings
{
HtmlText = htmlText,
FooterSettings = footerSettings
}
}
};
return converter.Convert(document);