问题是:我使用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;
}