jsreport.AspNetCore mvc 页面到 PDF 正确呈现内部网,但从远程站点使用时大小不同
jsreport.AspNetCore mvc page to PDF rendering intranet properly but different size while using from remote site
jsreport.AspNetCore mvc 页面到 PDF 正确渲染内部网但从远程站点使用时大小不同,请帮助 css .invoice-box 代码是
var header = await JsReportMVCService.RenderViewToStringAsync(HttpContext, RouteData, "Header", new { });
var footer = await JsReportMVCService.RenderViewToStringAsync(HttpContext, RouteData, "footer", new { });
HttpContext.JsReportFeature()
.Recipe(Recipe.ChromePdf)
.Configure((r) => r.Template.Chrome = new Chrome
{
Format= "A4",
HeaderTemplate = header,
FooterTemplate=footer,
DisplayHeaderFooter = true,
MarginTop = "3cm",
MarginLeft = ".5cm",
MarginBottom = "1cm",
MarginRight = ".5cm"
}).OnAfterRender((r) => HttpContext.Response.Headers["Content-Disposition"] = "attachment; filename=\"myReport.pdf\"");
我遇到了问题,因为 jsreport 仅采用内联 css 仅在远程执行时
jsreport.AspNetCore mvc 页面到 PDF 正确渲染内部网但从远程站点使用时大小不同,请帮助 css .invoice-box 代码是
var header = await JsReportMVCService.RenderViewToStringAsync(HttpContext, RouteData, "Header", new { });
var footer = await JsReportMVCService.RenderViewToStringAsync(HttpContext, RouteData, "footer", new { });
HttpContext.JsReportFeature()
.Recipe(Recipe.ChromePdf)
.Configure((r) => r.Template.Chrome = new Chrome
{
Format= "A4",
HeaderTemplate = header,
FooterTemplate=footer,
DisplayHeaderFooter = true,
MarginTop = "3cm",
MarginLeft = ".5cm",
MarginBottom = "1cm",
MarginRight = ".5cm"
}).OnAfterRender((r) => HttpContext.Response.Headers["Content-Disposition"] = "attachment; filename=\"myReport.pdf\"");
我遇到了问题,因为 jsreport 仅采用内联 css 仅在远程执行时