0

在 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
     };
}
4

1 回答 1

0

您是否尝试过page-break-inside: avoid;结合动态更改字体大小?

于 2013-10-07T19:54:00.093 回答