----- Original Message ----- From: "Joachim Kanbach" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, July 31, 2002 19:54 Subject: [iText-questions] Line Wrap in PdfPTable with Fixed Cell Height
> Hello all, > > I want to achieve the following result with iText: > I need a PdfPTable with one column and all the lines have the same > height. > The contents of the cells differ in length and some exceed the table > width. > When I let noWrap set to false, the cells perform word-based line > wrapping. > I use a fixed height for the cells in order to discard the characters > which > are wrapped to the next line. > > 1. Is it possible to change the wrapping to character-based wrapping > instead > of words? > Use Chunk.setSplitCharacter(SplitCharacter splitCharacter). Make it return true for all characters. > > > As long as the font size is smaller then the fixed height of the cells, > everything works fine. But sometimes the font size might exceed the > fixed > height. In this case, the letters should overwrite any text which is > above. > However, when I set the font size larger than the fixed height, nothing > is > drawn at all. > When noWrap is set to true, characters with a large font do overwrite > the > content above. > The behavior is the same in both cases but you may have auto leading and different fonts that may not allow you to compare exactly. > 2. Is there a way to force the table or the cells to draw a text which > is > larger than the fixed cell height while in wrapping mode? > You have to play with setLeading() and setPaddingTop(). Best Regards, Paulo Soares > > Regards, > Joachim Kanbach > ------------------------------------------------------- This sf.net email is sponsored by: Dice - The leading online job board for high-tech professionals. Search and apply for tech jobs today! http://seeker.dice.com/seeker.epl?rel_code=31 _______________________________________________ iText-questions mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/itext-questions
