The reason why it doesn't work is very simple. You are defining the NO_BORDER
value and the cell event for the DefaultCell
. As documented, the properties of the default cell are used when you add a cell without creating a cell yourself. For instance:
table.AddCell("Test 1");
In your case, you are not using the default cell, you are creating your own PdfPCell
instance:
PdfPCell cell = new PdfPCell(new Phrase("Footer"));
This cell
instance has its properties of its own. It doesn't look at what you defined for the DefaultCell
(otherwise there would be no way to introduce properties that are different from the default). Hence you need:
cell.Border = PdfPCell.NO_BORDER;
cell.CellEvent = new RoundedBorder();
Now the specific cell cell
will only have a rounded border.