Good day, I'm trying to create a simple table with iTextSharp, so with c#. The goal is a table like this one:
The problem is that if I apply the rowspan as 2 on cell A, iTextSharp does not render the rowspanned cell, this means that the cell have the same height of cell B. Here's the code:
PdfPTable corporateTable = new PdfPTable(2);
corporateTable.HeaderRows = 1;
corporateTable.TotalWidth = pdfWidth - 50;
PdfPCell vCell = new PdfPCell();
vCell.Border = Rectangle.BOX;
vCell.Rowspan = 2;
vCell.Phrase = new Phrase("A", new Font(fontLh, 7f, 1, BaseColor.BLACK));
corporateTable.CompleteRow();
corporateTable.AddCell(vCell);
PdfPCell vCellx = new PdfPCell();
vCellx.Phrase = new Phrase("B", new Font(fontLh, 7f, 1, BaseColor.BLACK));
vCellx.Colspan = 3;
corporateTable.AddCell(vCellx);
PdfPCell vCell1 = new PdfPCell();
vCell1.Phrase = new Phrase("C", new Font(fontValue, 7f, 0, BaseColor.BLACK));
corporateTable.AddCell(vCell1);
corporateTable.WriteSelectedRows(0, -1, 100f, 100f, writer.DirectContent);
document.Close();
What's wrong? I'm using the latest version of the dll. thanks and best regards
alberto