Does iTextPdf allow to set spacing between cells in table?
I have a table with 2 columns and I am trying to draw a border-bottom on cell. I want space between each border same as cell padding.
I am using below code:
PdfPTable table = new PdfPTable(2);
table.setTotalWidth(95f);
table.setWidths(new float[]{0.5f,0.5f});
table.setHorizontalAlignment(Element.ALIGN_CENTER);
Font fontNormal10 = new Font(FontFamily.TIMES_ROMAN, 10, Font.NORMAL);
PdfPCell cell = new PdfPCell(new Phrase("Performance", fontNormal10));
cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
cell.setHorizontalAlignment(Element.ALIGN_LEFT);
cell.setBorder(Rectangle.BOTTOM);
cell.setPaddingLeft(10f);
cell.setPaddingRight(10f);
table.addCell(cell);
table.addCell(cell);
table.addCell(cell);
table.addCell(cell);
document.add(table);
How do I do this?