testTable = new PdfPTable(1); PdfPCell c2; testTable.addCell("aaaa"); testTable.addCell("bbbb"); c2 = new PdfPCell (testTable);//this line made the difference c2.setPadding(0); outerTable.addCell(c2);
Phrase content = new Phrase("Blah blah blah", Font); Float fontSize = content.getFont().getSize(); Float capHeight = content.getFont().getBaseFont().getFontDescriptor(BaseFont.CAPHEIGHT, fontSize); Float padding = 5f; PdfPCell cell = new PdfPCell(content); cell.setPadding(padding); cell.setPaddingTop(capHeight - fontSize + padding);
/** * Sets the padding of the contents in the cell (space between content and border). * * @param padding */ public void setPadding( float padding ) { getWrapperCell().setPadding( padding ); }
/** * Sets the padding of the contents in the cell (space between content and border). * * @param padding */ public void setBorderPadding( float padding ) { getWrapperCell().setPadding( padding ); }
/** * Sets the padding of the contents in the cell (space between content and border). * * @param padding */ public void setPadding( float padding ) { getWrapperCell().setPadding( padding ); }
/** * Sets the padding of the contents in the cell (space between content and border). * * @param padding */ public void setBorderPadding( float padding ) { getWrapperCell().setPadding( padding ); }
private synchronized PdfPCell createPdfPCell() { if ( cell != null ) { return cell; } PdfPCell cell = new PdfPCell(); cell.setBorder( Rectangle.NO_BORDER ); cell.setPadding( 0 ); return cell; }
private synchronized PdfPCell createPdfPCell() { if ( cell != null ) { return cell; } PdfPCell cell = new PdfPCell(); cell.setBorder( Rectangle.NO_BORDER ); cell.setPadding( 0 ); return cell; }
private synchronized PdfPCell createPdfPCell() { if ( cell != null ) { return cell; } PdfPCell cell = new PdfPCell(); cell.setBorder( Rectangle.NO_BORDER ); cell.setPadding( 0 ); return cell; }
private synchronized PdfPCell createPdfPCell() { if ( cell != null ) { return cell; } PdfPCell cell = new PdfPCell(); cell.setBorder( Rectangle.NO_BORDER ); cell.setPadding( 0 ); return cell; }
private synchronized PdfPCell createPdfPCell() { if ( cell != null ) { return cell; } PdfPCell cell = new PdfPCell(); cell.setBorder( Rectangle.NO_BORDER ); cell.setPadding( 0 ); return cell; }
public PdfPCell getCell(String content, String title) { PdfPCell cell = new PdfPCell(new Phrase(content)); cell.setCellEvent(new Title(title)); cell.setPadding(5); return cell; }
private PdfPCell createCell() { PdfPCell cell = new PdfPCell(); cell.setBorder( Table.NO_BORDER ); cell.setPadding( 0.0f ); cell.setUseBorderPadding( true ); return cell; }
private PdfPCell createCell() { PdfPCell cell = new PdfPCell(); cell.setBorder( Table.NO_BORDER ); cell.setPadding( 0.0f ); cell.setUseBorderPadding( true ); return cell; }
public static PdfPCell createBarcode(PdfWriter writer, String code) throws DocumentException, IOException { BarcodeEAN barcode = new BarcodeEAN(); barcode.setCodeType(Barcode.EAN8); barcode.setCode(code); PdfPCell cell = new PdfPCell(barcode.createImageWithBarcode(writer.getDirectContent(), BaseColor.BLACK, BaseColor.GRAY), true); cell.setPadding(10); return cell; }
private PdfPCell createCell() { PdfPCell cell = new PdfPCell(); cell.setBorder( Table.NO_BORDER ); cell.setPadding( 0.0f ); cell.setUseBorderPadding( true ); cell.getColumn().setAdjustFirstLine( false ); return cell; }
private void setSimpleFormat(final PdfPTable headerTable) { headerTable.getDefaultCell().setBorder(Rectangle.NO_BORDER); headerTable.getDefaultCell().setPadding(6.0f); headerTable.getDefaultCell().setVerticalAlignment(PdfPCell.ALIGN_TOP); }
private void alignColumn(final PdfPCell cell, final ColumnAlignment columnAlignment) { if (ColumnAlignment.LEFT.equals(columnAlignment)) { cell.setHorizontalAlignment(Element.ALIGN_LEFT); } else if (ColumnAlignment.RIGHT.equals(columnAlignment)) { cell.setHorizontalAlignment(Element.ALIGN_RIGHT); } cell.setBorder(Rectangle.BOX); cell.setPadding(2f); }
private void setSimpleFormat(final PdfPTable headerTable) { headerTable.getDefaultCell().setBorder(Rectangle.NO_BORDER); headerTable.getDefaultCell().setPadding(2.0f); headerTable.getDefaultCell().setVerticalAlignment(PdfPCell.ALIGN_TOP); }
private void setSimpleFormat(final PdfPTable headerTable) { headerTable.getDefaultCell().setBorder(Rectangle.NO_BORDER); headerTable.getDefaultCell().setPadding(6.0f); headerTable.getDefaultCell().setVerticalAlignment(PdfPCell.ALIGN_TOP); }