private static void addCell(PdfPTable table, string text, int rowspan, string fontStyle)
{
BaseFont bfTimes = BaseFont.CreateFont(BaseFont.HELVETICA, BaseFont.CP1252, false);
iTextSharp.text.Font fuente = new iTextSharp.text.Font(bfTimes, 8, iTextSharp.text.Font.NORMAL, iTextSharp.text.BaseColor.BLACK);
if (fontStyle.ToLower() == "n")
{
fuente.SetStyle(Font.NORMAL);
}
else if (fontStyle.ToLower() == "b")
{
fuente.SetStyle(Font.BOLD);
}
else if (fontStyle.ToLower() == "i")
{
fuente.SetStyle(Font.ITALIC);
}
PdfPCell cell = new PdfPCell(new Phrase(text, fuente));
cell.BorderWidth = 0;
cell.Rowspan = rowspan;
cell.HorizontalAlignment = PdfPCell.ALIGN_LEFT;
cell.VerticalAlignment = PdfPCell.ALIGN_MIDDLE;
table.AddCell(cell);
}