在ASP.NET MVC中将HTML转换为PDF

问题描述:

我在一个项目中工作,需要当前的html页面转换为pdf,pdf将自动保存在服务器上的按钮点击,它的引用将保存在数据库中。如果数据来自数据库,我可以转换视图但是这种形式的数据是静态的,这意味着它在视图上有这么多单选按钮和文本框,我可以在其中编写详细信息并在单击保存按钮后选中复选框,它将保存在服务器上,并且其参考将保存在数据库中。



原因是我不保存数据库中的数据是报告对客户端的使用较少,但如果我保存数据数据库然后数据库变得非常庞大,处理变得复杂。因为该报告有大约100个字段。

所以请任何人可以帮助我。

Im working in a project which requires current html page to convert in pdf and that pdf will automatically save on button click on server and its reference will be save in database.I can convert the view if its data comes from data base but the data in this form is static that means on the view it has so many radio button and text box in which i can write the detail and check the check box on after clicking save button it will save on the server and and its reference will save in the data base.

the reason is that im not saving the data in database is that the report is less use full for the client but if i save the data in data base then the database become very huge and its become complicate to handle. because the report has approx 100 fields.
so please if any one can help me in it.

试试这篇CP文章: b $ b

使用iTextSharp在ASP MVC中渲染PDF视图 [ ^ ]
Try this CP article:

Rendering PDF views in ASP MVC using iTextSharp[^]