【问题标题】:How to use Rotativa to shrink content down to a single PDF page?如何使用 Rotativa 将内容缩小到单个 PDF 页面?
【发布时间】:2013-10-12 01:22:21
【问题描述】:

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

【问题讨论】:

    标签: asp.net-mvc asp.net-mvc-4 pdf-generation rotativa


    【解决方案1】:

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

    【讨论】:

      猜你喜欢
      • 2016-12-31
      • 1970-01-01
      • 1970-01-01
      • 2021-12-21
      • 2018-09-15
      • 2021-01-24
      • 1970-01-01
      • 2018-02-14
      • 1970-01-01
      相关资源
      最近更新 更多