In iTextSharp, how to set the space between two cells(PdfPCell)
Code:
var doc = new Document();
PdfWriter.GetInstance(doc, new FileStream("C:/Doc1.pdf", FileMode.Create));
doc.Open();
PdfPTable table = new PdfPTable(1);
PdfPCell cell1 = new PdfPCell(new Phrase("Cell1"));
cell1.Colspan = 1;
table2.AddCell(cell1);
PdfPCell cell2 = new PdfPCell(new Phrase("Cell2"));
cell2.Colspan = 1;
table2.AddCell(cell2);
doc.Add(table);
System.Diagnostics.Process.Start("C:/Doc1.pdf");
Here, two cells are created(cell2's left border overlapped with cell1's border right). But I need a little space between 2 cells.