C# 当有多个页面时,Rotativa会中断HTML
我正在使用Rotativa从HTML创建pdf,我的代码如下所示C# 当有多个页面时,Rotativa会中断HTML,c#,.net,pdf,rotativa,C#,.net,Pdf,Rotativa,我正在使用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 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
};
对我来说一切都很好,但当有超过一页的时候,这一页就扯平了。如下图所示
如何解决此问题?我使用最新版本的wkhtmltopdf(当前版本为0.12.5)解决了此问题 您可以从这里下载: 希望有帮助 Syncfusion提供了一个选项,可以将HTML转换为PDF,而无需跨页面分割文本和图像。有关更多信息,请参阅帮助文档 注:我为Syncfusion工作