Use the following for loop i have added code to change font size and style
for (int x = 0; x < GridView1.Columns.Count; x++)
{
widths[x] = (int)GridView1.Columns[x].ItemStyle.Width.Value;
BaseFont bfTimes = BaseFont.CreateFont(BaseFont.TIMES_ROMAN, BaseFont.CP1252, false);
Font times = new Font(bfTimes, 12, Font.ITALIC, Color.RED);
string cellText = Server.HtmlDecode(GridView1.HeaderRow.Cells[x].Text);
iTextSharp.text.Cell cell = new iTextSharp.text.Cell();
cell.Add(new Phrase(cellText, times));
cell.BackgroundColor = new Color(System.Drawing.ColorTranslator.FromHtml("#008000"));
table.AddCell(cell);
}