I am using iText to build a phone directory and each page contains two columns and each entry 3 lines of text followed by a blank line. My problem is that entries are getting split across columns, and I've unsuccessfully tried two different mechanisms to try and control it.
Each entry is a PdfPTable() containing 4 rows. so, I've tried using setKeepTogether(true). According to the Javadoc, "If true the table will be kept on one page if it fits, by forcing a new page if it doesn't fit on the current page." Does that not work properly with MultiColumnText() (i.e., forces a new column) or is there something I need to do besides simply setting setKeepTogether() to true? The other mechanism I tried was to use the MultiColumnText() method nextColumn() after adding 15 table entries by using a counter that gets reset after every call to the nextColumn() method. But instead of getting a new column every 15 entries, the first column on the first page was skipped and after that calls to nextColumn() appear to be ignored. nextColumn() obviously doesn't work the way I think it does. What is an appropriate way to ensure that no table splits across a column? Thanks, Rob ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace _______________________________________________ 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/
