简体   繁体   English

如何从asp.net网页生成pdf报告

[英]how to generate a pdf report from asp.net web page

I have a web page in my application, which has two pictures in the header, a table after this header with two rows and 2 columns (In this table I have textbox for entering item Id), then a gridview to display the records of particular item, and at the end I have another table after the "gridview" (In this table I have another textbox to display total no.of records). 我的应用程序中有一个网页,标题中有两张图片,该标题后有两行两列的表格(在此表格中,我有用于输入项目ID的文本框 ),然后是gridview以显示特定记录项,最后在“ gridview”之后有另一个表(在此表中,我还有另一个文本框来显示记录总数。) If I enter just itemId, then it display all the records of that item in the gridview and total no.of records in the textbox. 如果我仅输入itemId,则它将在Gridview中显示该项目的所有记录,并在文本框中显示记录总数。 I have to repeate this process for 170 items, kindly show me some solution to get all the items data just in a click, but for every item (the header and two tables must be repeated).., and if this output either I can save in pdf file or as word file.. 我必须对170个项目重复此过程,请给我展示一些解决方案,只需单击一下即可获取所有项目数据,但是对于每个项目(必须重复标题和两个表)..如果输出,我可以保存为pdf文件或Word文件。

Thanks in advance.. 提前致谢..

我建议您使用JSPDF ...简单又好: http ://parall.ax/products/jspdf

What I have used in the past it is iTextSharp. 我过去使用的是iTextSharp。 I think it is one of the most powerful open source frameworks available to work with PDFs in general. 我认为它是可用于一般PDF的最强大的开源框架之一。

Here are some code sample on how to use it: 以下是一些有关如何使用它的代码示例:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM