Pulling column names from a database. Column names aren't user friendly so was wanting to rename them on the pdf. Is there a way to do this?
foreach (DataColumn column in dt.Columns)
{
PdfPCell pCell = new PdfPCell(new Phrase(column.ColumnName, TableHeaderFont));
pCell.BackgroundColor = BaseColor.BLUE;
pCell.Padding = 6;
contentTable.AddCell(pCell);
}
this is the code I'm using to pull the column names.