【发布时间】:2018-07-26 07:07:19
【问题描述】:
我正在使用 Rotativa 从 HTML 创建一个 pdf,我的代码如下所示
var CustomSwitches = "--footer-right \"Date: [date] [time]\" " + "--footer-center \"Page: [page] of [toPage]\" --footer-line --footer-font-size \"9\" --footer-spacing 5 --footer-font-name \"calibri light\"";
var rotativaOptions = new DriverOptions { CustomSwitches = CustomSwitches,PageSize = Size.A4};
return new ViewAsPdf("~/Views/Partials/Report/SummaryReportspdf.cshtml")
{
RotativaOptions = rotativaOptions
};
对我来说一切看起来都不错,但是当页面超过一页时,分页会很平衡。它看起来像下图
我该如何解决这个问题?
【问题讨论】: