Mikael Ståldal wrote: > I have a PdfPTable and I want the text in the PdfPCells to be truncated if it > doesn't fit on > one row. > > The default behaviour of iText is to wrap the text into several lines, and I > can turn this > of using PdfPCell.setNoWrap(true). But without wrapping, the text overflows > and mess up the > cell to the right. How can I make iText to truncate (clip) the text at the > cell border?
See page 173 of the book 'iText in Action'; http://itext.ugent.be/itext-in-action/ Look at the code sample annotation "Row4". cell.setFixedHeight(72f); Change 72f to a value that corresponds with your requirements. br, Bruno ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/
