iText set cell's height

允我心安 提交于 2020-01-03 18:34:07

问题


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


回答1:


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 :-)



来源:https://stackoverflow.com/questions/8266554/itext-set-cells-height

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!