I'm trying via C # and with iTextSharp create a pdf doc with the following structure: I have a table with 3 Rows In the 1st I have X columns with X years. In the 2nd a Row with the Months (J, F, M ... etc) for each year, below I have another Row that I want to affect the property of the CellBackgroundColor for anything,
I'm having a lot of difficulties doing it, does anyone help me around here? Here is part of the code, I have already moved and remexi much that I will remake again.
PdfPTable tabelaAnos = new PdfPTable(iAnos);
for (int i = 0; i < iAnos; i++)
{
PdfPCell cellAnos1 = new PdfPCell();
AnoInicio = AnoInicio + 1;
cellAnos1 = new PdfPCell(new Phrase("Ano " + AnoInicio));
cellAnos1.HorizontalAlignment = 1; //0=Left, 1=Centre, 2=Right
tabelaAnos.AddCell(cellAnos1);
}
for (int i = 1; i < 13; i++)
{
PdfPCell cell = new PdfPCell();
cell = new PdfPCell(new Phrase("Meses com " + i + " columns"));
cell.Colspan = 12;
cell.HorizontalAlignment = 1; //0=Left, 1=Centre, 2=Right
tabelaAnos.AddCell(cell);
}