2017-05-04 45 views
0

我需要从视图生成PDF。 我正在使用Rotativa,但始终生成移动大小(查看文件包括bootsrap)。 如何禁用Rotativa中的调整大小。 我的代码是:ASP.NET MVC Rotativa.ViewAsPdf生成移动视图(我想要全尺寸)

ViewAsPdf pdf = new ViewAsPdf("DownloadViewPDF", property) 
     { 

      FileName = "Angel" + ".pdf", 
      PageOrientation = Orientation.Landscape, 
      PageMargins = new Margins(0, 0, 0, 0), 
      PageSize = Rotativa.Options.Size.A4, 
      CustomSwitches = "--disable-smart-shrinking" 


     }; 


     return pdf; 

回答

0

删除引导或者你可以给链接裁判在引导元素在你的CSHTML要为其生成PDF