我尝试使用 MvcRazorToPdf,我可以生成邮件合并信件。我的目标是在下载文件后我想从控制器返回 json 消息。怎么做?
Controller: [how to convert the below lines to generate pdf and download without return]
return new PdfActionResult(pdfres, (writer, document) =>
{
document.SetPageSize(new Rectangle(PageSize.A4));
document.NewPage();
})
{
FileDownloadName = "ElanWasHere.pdf"
};
我感谢您的帮助。谢谢