[Rotativa]导出为pdf为空-将“搜索”过滤器应用于部分视图表时

时间:2018-09-11 18:56:06

标签: c# asp.net rotativa

问题是:我使用rotativa将html表导出为pdf。 在没有过滤器的情况下导出时,可以正常导出,但是在应用过滤器时,例如搜索将为空。

表位于partialView中,并且行由Foreach生成。

  [HttpGet]
    public ActionResult PrintViewToPdf()
    {
        var model = new List<HistoricoEmpleados>();
        var report = new PartialViewAsPdf("_ReporteEmpleados", model)
        {
            FileName="Empleados.pdf",
            PageSize = Size.A4,
            PageOrientation = Orientation.Portrait,
            PageMargins = new Margins(0, 0, 0, 0),
            PageWidth = 210,
            PageHeight = 297


        };


        return report;
    }

0 个答案:

没有答案