Search code examples
javaitextpdf-generation

iText set cell's height


I am using a java version of this library and can't figure out how to set the cell's height. When I use cell.setFixedHeight() and passing any number less that 18 the content dissapears in output PDF file. Why? Thank you


Solution

  • Check whether the width and height given for document is not exceeds.

    Document document = new Document(PageSize.A4, 60, 60, 120, 80);

    and for cell height you have to give in float value for e.g

    Cell.setFixedHeight(45f);

    I hope this will help you to proceed further :-)