PdfPTable as a header in iTextSharp
I need a table with about 12 cells to display as a header. The following code fails to do this. I am aware table2 does not have 12 cells. On the second page, only "testing" is displayed. What am I missing? Thanks in advance! Document document = new Document(); try { PdfWriter.GetInstance(document, new FileStream("TableTest.pdf", FileMode.Create)); document.Open(); PdfPTable table = new PdfPTable(1); table.WidthPercentage = 100; PdfPTable table2 = new PdfPTable(2); //logo PdfPCell cell2 = new PdfPCell(Image.GetInstance(@"C:\path\to\file.gif")); cell2.Colspan = 2; table2.AddCell(cell2); //title