/** * Adds an iText element to the cell. * * @param element */ public void addElement(Element element) { if (table != null) { table = null; column.setText(null); } if (element instanceof PdfPTable) { ((PdfPTable) element).setSplitLate(false); } else if (element instanceof PdfDiv) { for (Element divChildElement : ((PdfDiv) element).getContent()) { if (divChildElement instanceof PdfPTable) { ((PdfPTable) divChildElement).setSplitLate(false); } } } column.addElement(element); }
/** * Adds an iText element to the cell. * * @param element */ public void addElement(Element element) { if (table != null) { table = null; column.setText(null); } if (element instanceof PdfPTable) { ((PdfPTable) element).setSplitLate(false); } else if (element instanceof PdfDiv) { for (Element divChildElement : ((PdfDiv) element).getContent()) { if (divChildElement instanceof PdfPTable) { ((PdfPTable) divChildElement).setSplitLate(false); } } } column.addElement(element); }
private PdfPTable createTable( PdfPCell cell ) { PdfPTable table = new PdfPTable( 1 ); table.setWidthPercentage( 100.0f ); table.setSplitLate( false ); table.addCell( cell ); return table; }
private PdfPTable createTable( PdfPCell cell ) { PdfPTable table = new PdfPTable( 1 ); table.setSpacingBefore( this.spacingBefore() ); table.setSpacingAfter( this.spacingAfter() ); table.setHorizontalAlignment( this.getHorizontalAlignment() ); table.setTotalWidth( cell.getPaddingLeft() + this.getTotalWidth() + cell.getPaddingRight() ); table.setLockedWidth( true ); table.setSplitLate( false ); table.addCell( cell ); return table; }