2013-10-04 69 views
0

在ASP.NET项目中使用Rotativa,我想知道是否有一种方法可以通过编程的方式告诉它将用于生成PDF的HTML内容缩小到一个单一的横向页面?如何使用Rotativa将内容缩小到单个PDF页面?

我当前的代码如下所示:

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

您是否尝试过使用page-break-inside: avoid;与动态变化改变您的字体大小结合起来呢?

相关问题