0
kicks
Exporting paging enabled GridView to pdf using iTextSharp
In my previous post Export GridView to pdf using iTextSharp in ASP.NET , i explained how to write Grid View contents to a PDF file , but this code has some bugs
1. Code doesn't work if paging is enabled in GridView
2. Cloumns become of variable width in PDF documnt as shown in the image below
To fix these problems we need to write code without using xmlTextReader and HtmlParser.
for this we need to create a table in PDF document and then fill the cells of table from GridView
And the new html and codebehind would become like this