This should be really simple: I have a PdfPTable that crosses a page boundary. I would like to tell iText to force a page break before the PdfPTable if it would split the table. According to section 6.1.5 of iText in Action, I should be able to do this with table.setSplitLate(true). But whether I set it true or false, the result is the same: the table splits at a page boundary.
In this case, the data is just a series of text blocks: PdfPTable table = new PdfPTable(2); table.setSplitLate(false); table.getDefaultCell().setBorder(0); table.setSplitRows(false); int[] width = { 50, 50 }; table.getDefaultCell().setBorder(0); table.setWidths(width); table.setWidthPercentage(100); PdfPCell space1 = new PdfPCell(new Phrase(" ")); space1.setBorder(0); space1.setColspan(2); table.addCell(space1); PdfPCell space2 = new PdfPCell(new Phrase(" ")); space2.setBorder(0); space2.setColspan(2); table.addCell(space2); PdfPCell tableCell1 = new PdfPCell(new Phrase(" ")); tableCell1.setBorder(0); table.addCell(tableCell1); PdfPCell tableCell2 = ReportUtil.getFormattedCell("Respectfully submitted,", 12, false, 0); table.addCell(tableCell2); PdfPCell tableCell3 = new PdfPCell(new Phrase(" ")); tableCell3.setColspan(2); tableCell3.setBorder(0); table.addCell(tableCell3); PdfPCell tableCell6 = new PdfPCell(new Phrase(" ")); tableCell6.setBorder(0); table.addCell(tableCell6); PdfPCell tableCell7 = ReportUtil.getFormattedCell("______________________________", 11, true, 0); table.addCell(tableCell7); PdfPCell tableCell8 = new PdfPCell(new Phrase(" ")); tableCell8.setBorder(0); table.addCell(tableCell8); // adding the signature appUser.log(3, this, method, "adding signature "); String supName = ""; PSIReportSectionVO signVO = new PSIReportSectionVO(); signVO = processor.loadSupervisorSignature(theForm.getReferralId()); if (signVO != null && signVO.getSupSigFlg() != null && signVO.getSupSigFlg().equalsIgnoreCase("N") && signVO.getSupSigName() != null && !signVO.getSupSigName().trim().equalsIgnoreCase("")) supName = signVO.getSupSigName().trim(); else supName = myVO.getSuprName(); PdfPCell tableCell9 = ReportUtil.getMergedDataPdfPCell("", myVO.getInvstName(), 1, 11, 0); table.addCell(tableCell9); PdfPCell tableCell10 = new PdfPCell(new Phrase(" ")); tableCell10.setBorder(0); table.addCell(tableCell10); PdfPCell tableCell11 = ReportUtil.getFormattedCell("Presentence Investigator", 12, false, 0); table.addCell(tableCell11); PdfPCell tableCell12 = ReportUtil.getFormattedCell("Approved: ______________________________", 11, true, 0); tableCell12.setBorder(0); table.addCell(tableCell12); PdfPCell tableCell13 = ReportUtil.getMergedDataPdfPCell("", (myVO.getAgcyDesc() != null ? (myVO.getAgcyDesc()) : ""), 1, 11, 0); table.addCell(tableCell13); PdfPCell tableCell14 = ReportUtil.getMergedDataPdfPCell("", ((supName != null && !supName.trim().equalsIgnoreCase("")) ? (supName.trim() + ", Section Supervisor") : " Section Supervisor"), 1, 11, 0); tableCell14.setBorder(0); table.addCell(tableCell14); ------------------------------------------------------------------------------ EditLive Enterprise is the world's most technically advanced content authoring tool. Experience the power of Track Changes, Inline Image Editing and ensure content is compliant with Accessibility Checking. http://p.sf.net/sfu/ephox-dev2dev _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions iText(R) is a registered trademark of 1T3XT BVBA. Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php