2008/1/28, Leonard Rosenthol <[EMAIL PROTECTED]>: > On Jan 28, 2008, at 7:27 AM, Stephan Michels wrote: > > I can simply prevent orphans in a column if I check if the available > > height is smaller than e.g. 2 rows, then I put the paragraph into the > > next column. > > To prevent widows I have to adjust the character and word spacing so > > that I have an additional row. I know I can increase the c. and w. > > spacing only a little, just below the visibility, but sometimes it is > > enough to prevent the orphan. > > Why not implement this sort of stuff directly into iText (and then > provide a patch)?? By doing widow and orphan control internally, in > conjunction with a smarter justification algorithm that takes > vertical issues into consideration will just improve iText.
Sure! My current experiement is to add the information about character and word spacing to Chunk, copy the information to PdfChunk and then using it to calculate the correct width in BidiLine.processLine(). The biggest hurdle is right now to combine it with the justify alignment in PdfDocument.writeLineToContent(). If this works then you have the instrument to control windows and it is possible to add an automatic algorithm. Stephan. ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/