Generating Pdf from webpage in asp.net

2019-05-25 08:08发布

Could you give me some recommendations on free/Openspurce library etc that could be integrated on asp.net application to Generate Pdf out of Html fragments. I will be generating Invoices that is displayed in DataGrid and tables. Is there some readily available library that would print the whole Table with Datagrid into Pdf. ITextSharp seems nice but i will have to do the tough work of adding tables and blah blah when everything is already in the webpage. this is a possible duplicate but it generates pdf from Full page which is not desired Possible duplicate question

3条回答
forever°为你锁心
3楼-- · 2019-05-25 08:41

When doing invoices, I usually go a slightly different way, by starting with Aspose.Words and using the nested mail merge feature.

Another option could be the HTML to PDF feature of Aspose.Pdf.

Both libraries are commercial only, I don't know whether this is appropriate for your project.

查看更多
欢心
4楼-- · 2019-05-25 08:42

ITextSharp does almost what you ask and is Open Source, however the API for conversion process has not been touched for years and is outdated. I therefore would recommend a commercial product.

Something like Winnovative HTML to PDF Converter

To be honest I look at it like this, you can save money by buying a licence for a commercial product rather than spending days developing a solution yourself.

Edit If it is for generating invoices alone then I would use iTextSharp as it does not take long to learn the basics. However if you want to be able to convert a full rich webpage into a PDF then go down the commercial route.

查看更多
登录 后发表回答