Hi. I would like to keep a Header Table and a Content Table of varying length together; not split over two pages. The Content Table's stuff can be split between pages. But I would like the Header Table and maybe the first 2 rows of the Content Table to be together. If there is insufficient space for this to happen I would like the Header Table and the Content Table to start on the beginning of the next page? Is there a way to do this? I played around with keepTogether to no avail:
private PdfPTable parentTable; private PdfPTable headerTable; private PdfPTable contentTable; ... //within a loop contained in the "generateReport()" function: parentTable = new PdfPTable(1); parentTable.setKeepTogether(true); //Other formatting options here ... headerTable = new PdfPTable(4); //Other formatting options here ... contentTable = new PdfPTable(n); //Other formatting options here ... //adding cells & content. ... parentTbl.addCell(headerTable); parentTbl.addCell(contentTable); document.add(dwrParentTbl); document.close(); } How can I get the headerTable to start printing on the next page if there is NOT enough room to fit it and n rows of the contentTable onto the same page? In other words I dont want a headerTable all by itself on the bottom of a page -- I would rather have it start printing on the next page. Thank you, Geo ------------------------------------------------------------------------------ Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT is a gathering of tech-side developers & brand creativity professionals. Meet the minds behind Google Creative Lab, Visual Complexity, Processing, & iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian Group, R/GA, & Big Spaceship. http://www.creativitycat.com _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.1t3xt.com/docs/book.php Check the site with examples before you ask questions: http://www.1t3xt.info/examples/ You can also search the keywords list: http://1t3xt.info/tutorials/keywords/
