See this post from the creator of iText. The DefaultCell
only gets used when calling AddCell
with a string, phrase, image or another table. When you manually create a cell using New PdfPCell()
then the defaults aren't used.
EDIT
Here's a sample factory method:
private static PdfPCell CreateCell() {
var c = new PdfPCell();
c.Padding = 5;
return c;
}
You can also skip the factory method if you're only setting properties and use object initialization:
var c = new PdfPCell() { Padding = 5 };