在ASP.NET项目中使用Rotativa,我想知道是否有办法以编程方式告诉它将用于生成PDF的HTML内容缩小为单个横向页面?
我目前的代码如下:
public ActionResult PrintStratgicMap(int employeeId, string slug, string fiscalYear)
{
return new ActionAsPdf("Goals", new { employeeId = employeeId, slug = slug, fiscalYear = fiscalYear })
{ FileName = "strategic_map.pdf",
FormsAuthenticationCookieName = ".auth",
CustomSwitches = "--print-media-type",
PageOrientation=Rotativa.Options.Orientation.Landscape
};
}
答案 0 :(得分:0)
您是否尝试过使用page-break-inside: avoid;
并动态更改字体大小?