In iText 7 we can work with cells in composite mode only, so we can not work with leading and Ascender / Descender. These values depend on the elements which you add into the cell. But still you can set the padding:
- padding is the extra space inside the borders of the cell. It's similar to the concept with the same name in HTML. You can change the padding of a cell with the
So, if you want the cell to have a minimal size, you need to set the padding to 0, the leading to match the size of the font, and tell iText to use the ascender and descender value.
DISCLAIMER: in the past, we've received reports from customers that showed us that not all fonts contain the correct ascender and descender information. This needs to be fixed at the font level.
Click How does a PdfPCell's height relate to the font size? if you want to see how to answer this question in iText 5.