Export GridView to PDF using iTextSharp

Although there are a lot of issues concerning export like iTextSharp does not recognize GridView column widths, we came to understand that iTextSharp simply recognize some CSS styles; thus specifying column widths will not work. The solution is to create tables with iTextSharp then have it in the same number of rows and columns in our GridView and specify those widths in our iTextSharp table. This will ensure that the column widths specified are not ignored in the PDF output.


This post contains a short tutorial on how we can successfully export GridView to PDF using iTextSharp.


Read the rest of the tutorial here: http://aspsnippets.com/Blue/Articles/Export-ASP.Net-GridView-to-PDF-with-Custom-Columns-Widths-using-iTextSharp.aspx

Leave a Reply

Your email address will not be published. Required fields are marked *