示例#1
0
        public async Task <IActionResult> CaseProceedings(int id)
        {
            var    model = service.CaseProceedings_Select(id);
            string html  = await this.RenderPartialViewAsync("~/Views/Case/", "CaseProceedings.cshtml", model, true);

            var pdfBytes = await new ViewAsPdfByteWriter("CreatePdf", new BlankEditVM()
            {
                HtmlContent = html
            }).GetByte(this.ControllerContext);

            return(File(pdfBytes, System.Net.Mime.MediaTypeNames.Application.Pdf, "CaseProceedings" + id.ToString() + ".pdf"));
        }