0
如何使用rotativa PDF在asp.net mvc區域中獲取我的視圖。在區域rotativa總是返回一個空白PDF。超出區域它工作正常。如何使用Rotativa PDF獲取Asp.Net MVC AREA的視圖?
我已經嘗試:
public ActionResult Report()
{
return new ViewAsPdf("Report") {
FileName = "Report.pdf",
PageSize = Size.A3,
PageOrientation = Orientation.Portrait,
PageMargins = { Left = 0, Right = 0 }
};
}
和:
public ActionResult Report()
{
return new ViewAsPdf("Report", new { area = "Admin" }) {
FileName = "Report.pdf",
PageSize = Size.A3,
PageOrientation = Orientation.Portrait,
PageMargins = { Left = 0, Right = 0 }
};
}