Try This:-
iTextSharp.text.Table table = new iTextSharp.text.Table(grdCust_accot_stmt.Columns.Count);
table.Cellpadding = 2;
table.Width = 100;
grdCust_accot_stmt.AllowPaging = false;
this.grd_Account_stmt();
for (int i = 0; i < grdCust_accot_stmt.Columns.Count; i++)
{
string cellText = Server.HtmlDecode(grdCust_accot_stmt.Columns[i].HeaderText);
iTextSharp.text.Cell cell = new iTextSharp.text.Cell(cellText);
cell.BackgroundColor = new iTextSharp.text.Color(System.Drawing.ColorTranslator.FromHtml("#e8eff3"));
table.AddCell(cell);
}
for (int i = 0; i < grdCust_accot_stmt.Rows.Count; i++)
{
if (grdCust_accot_stmt.Rows[i].RowType == DataControlRowType.DataRow)
{
for (int j = 0; j < grdCust_accot_stmt.Columns.Count; j++)
{
string cellText = Server.HtmlDecode
(grdCust_accot_stmt.Rows[i].Cells[j].Text);
iTextSharp.text.Cell cell = new iTextSharp.text.Cell(cellText);
if (i % 2 != 0)
{
cell.BackgroundColor = new iTextSharp.text.Color(System.Drawing.ColorTranslator.FromHtml("#e8eff3"));
}
table.AddCell(cell);
}
}
}
Document pdfDoc = new Document(PageSize.A2, 10f, 10f, 10f, 10f);
PdfWriter.GetInstance(pdfDoc, Response.OutputStream);
pdfDoc.Open();
pdfDoc.Add(table);
pdfDoc.Close();
Response.ContentType = "application/pdf";
Response.AddHeader("content-disposition", "attachment;" +"filename=Reports.pdf");
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.Write(pdfDoc);
Response.End();