Convert HTML to PDF in C# using iTextSharp
You can use iTextSharp in a commercial application and it does not require your app to be released as open source. But it will not work with complex HTML pages and will give fairly good results with simple HTML pages. Specially, tables are not yet supported. iTextSharp-- http://itextsharpsl.codeplex.com/. Code Snippet * // create converter * HtmlToPdfConverter html2pdf = new HtmlToPdfConverter(); * // open new pdf file * html2pdf.Open(@"test"); * // start a chapter * html2pdf.AddChapter(@"Dummy Chapter"); * string html = ...; * // convert string * html2pdf.Run(html); * // add a new chapter * html2pdf.AddChapter(@"Boost page"); * // read web page * html2pdf.Run(new Uri(@"http://www.apple.com")); * // close and finish pdf file. * html2pdf.Close(); http://dlvr.it/4p6bhk











