19
I'm trying to vertical align my headet cell text to be in the middle of the cell height.
This is my code:
PdfPCell c1 = new PdfPCell(cerate_phrase("" ,regular_bold ));
c1.setHorizontalAlignment(Element.ALIGN_CENTER);
c1.setVerticalAlignment(Element.ALIGN_MIDDLE);
c1.setBackgroundColor(BaseColor.LIGHT_GRAY);
table_.addCell(c1);
but this does not work. setHorizontalAlignment is centered but not setVerticalAlignment.
Am I doing something wrong? how can i vertically align it in the middle?
Any help will be appreciated.