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 Answers
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.

- 22,117
- 14
- 78
- 117
-
@Rippo i am in same shoes. But buying a Full grade commercial product for just generating invoices is an OverKill. I asked the question to just cut down my development time – Deeptechtons May 16 '11 at 05:41
-
1@Rippo using itextsharp will mean he must distribute the source of his application under the AGPL unless he buys the commcercial version. – Jaapjan May 16 '11 at 05:45
-
@Jaapjan - `The GNU Affero GPL v3 stipulates that any adaptation of software that it covers must prominently offer its source code for download to users who interact with it over a network` - Only if he decides to modify the source code – Rippo May 16 '11 at 05:53
-
@Rippo accept as answer as cornered and no other free way than iTextSharp. Thanks for the edited Info. – Deeptechtons May 16 '11 at 06:18
-
@Rippo Both itext/itextsharp released with strong copyleft licenses. Any software that uses them (statically or dynamically linked) should be released under AGPL (i.e. should be made open source). Basically that's why there are commercial licenses for both of these libraries. – Bobrovsky May 16 '11 at 13:59
-
mmmmm, this has changed since I last looked at it. It appears that the iText licence is now different from version 5 onwards, the F/OSS license was also upgraded from MPL/LGPL to AGPL. – Rippo May 16 '11 at 16:51
These links may help:
-
1Hmm i think only mature library out there is iTextSharp man crap. – Deeptechtons May 16 '11 at 05:51
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.

- 39,551
- 56
- 175
- 291