以单个PDF文件下载多个视图 [英] Download multiple views in as single PDF file

查看:85
本文介绍了以单个PDF文件下载多个视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个MVC3,Razor引擎应用程序有8个不同的视图(.cshtml)。我有这些页面供用户输入个人详细信息和其他东西。我可以按时下载每个页面(使用Rotativa来实现它)。但我需要将所有这8个视图作为单个PDF文件下载。每个视图都有不同的模型但只有一个控制器。请帮助

I have a MVC3, Razor engine application having 8 different views(.cshtml).I have these pages for users to enter personal details and other things. I can download each page at time(Used Rotativa to acheive it).But i need to download all these 8 views as a single PDF file.Each views have different models but only one controller.Please Help

推荐答案

您可以在pdf中使用iTextShap库或nuget包作为导出视图。

要导出单个pdf文件中的所有视图,您需要在代码中添加一些逻辑,可以在导出时将所有视图及其最终过程用于单个文档对象。
You can use iTextShap library or nuget package for the export view in pdf.
For export all views in single pdf file you need to put some logic in code , you can use single document object for all views and the process it finally at the time of export pdf.


这篇关于以单个PDF文件下载多个视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆