davidfossil wrote: > When adding a Phrase with a long text string to a narrow PdfPCell the text is > automatically wrapped into several lines.
OK. > In the project I am working on I > want the text to wrap, by floating out of the PdfPCell rather than by > expanding it. If that's a requirement: OK. Otherwise: not such an elegant way to render a table. > As a workaround I have set a fixed height on the PdfPCell, That's a good start. > causing the text to wrap "into nowhere". And the extra text is lost. > My idea here is to then catch the overflown text, to > manually add it to the cell below. My (untested) suggestion is: add empty cells with fixed heights. Create a custom Cell Event and pass the content of the cell to this Event class. Add such a cell event to each cell. In the cell event, render the content of the cell using ColumnText and the coordinates passed to the event. > From the iText source I have found that > PdfLine.add() and PdfChunk.split() seems that seems to do the actual line > splitting, but unfortunately its all package private and I can not seem to > find any "entraces" other than compiling my own modified iText. That's too complex. Use cell events and ColumnText. br, Bruno ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ 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/
