protected FileResult PdfResult(string fileName, IPagedList list) { list.NeedPage = false; list.DoSearch(); return(File(list.GeneratePDF(), "application/pdf", fileName + ".pdf")); }