PdfPCell cell = new PdfPCell(); cell.setCellEvent(new JFreeChartEvent(getChart()); cell.setFixedHeight(300.f); //height must be set if its row's height is not defined yet
public static void clearTable( PdfPTable table, boolean resetFixedHeight ) { for ( PdfPCell cell : table.getRow( 0 ).getCells() ) { cell.setColumn( createColumnText() ); if ( resetFixedHeight ) { cell.setFixedHeight( -1.0f ); } } }
public static void clearTable( PdfPTable table, boolean resetFixedHeight ) { for ( PdfPCell cell : table.getRow( 0 ).getCells() ) { cell.setColumn( createColumnText() ); if ( resetFixedHeight ) { cell.setFixedHeight( -1.0f ); } } }
public static void clearTable( PdfPTable table, boolean resetFixedHeight ) { for ( PdfPCell cell : table.getRow( 0 ).getCells() ) { cell.setColumn( createColumnText() ); if ( resetFixedHeight ) { cell.setFixedHeight( -1.0f ); } } }
public static void clearTable( PdfPTable table, boolean resetFixedHeight ) { for ( PdfPCell cell : table.getRow( 0 ).getCells() ) { cell.setColumn( createColumnText() ); if ( resetFixedHeight ) { cell.setFixedHeight( -1.0f ); } } }
PdfPCell cell; for(int i = 0;i< 25;i++) { if(locs.get(i) != null) { Font font = new Font(FontFamily.HELVETICA, 9, Font.BOLD, BaseColor.BLACK); cell = new PdfPCell(new Phrase(locs.get(i), font)); cell.setRotation(90); cell.setBorder(0); cell.setFixedHeight(110f); cell.setColspan(2); table.addCell(cell); } else { cell = new PdfPCell(); cell.setBorder(0); table.addCell(cell); } }
String headingLabel = "Test"; Paragraph heading = new Paragraph(headingLabel, new Font(helvetica, 28, Font.NORMAL, new BaseColor(0, 0, 0))); Float textWidth = ColumnText.getWidth(heading); Float maxAllowed = 630f; while (maxAllowed < textWidth) { fontSize -= 2; heading = new Paragraph(headingLabel, new Font(helvetica, fontSize, Font.NORMAL, new BaseColor(0, 0, 0))); textWidth = ColumnText.getWidth(heading); } heading.setAlignment(Element.ALIGN_CENTER); PdfPCell titleCell = new PdfPCell(); titleCell.setHorizontalAlignment(Element.ALIGN_CENTER); titleCell.setVerticalAlignment(Element.ALIGN_TOP); titleCell.addElement(heading); titleCell.setFixedHeight(65f); headerTable.addCell(titleCell);
cell.setFixedHeight(30); cell.setBorder(Rectangle.NO_BORDER); cell.setColspan(2); cell.setFixedHeight(30); cell.setVerticalAlignment(Element.ALIGN_MIDDLE); cell.setBorder(Rectangle.NO_BORDER); cell = new PdfPCell(code128Image, true); cell.setBorder(Rectangle.NO_BORDER); cell.setFixedHeight(30); table.addCell(cell);
logoRightCell.setFixedHeight(80); logoRightCell.setBorder(Rectangle.NO_BORDER); logoRightCell.setHorizontalAlignment(Element.ALIGN_RIGHT); logoLeftCell.setFixedHeight(80); logoLeftCell.setBorder(Rectangle.NO_BORDER); logoLeftCell.setHorizontalAlignment(Element.ALIGN_LEFT);
for ( PdfPCell cell : layoutTable.getRow( 0 ).getCells() ) cell.setFixedHeight( height >= 0.0f ? height : -1.0f ); cell.setColumn( ColumnText.duplicate( t ) );
for ( PdfPCell cell : layoutTable.getRow( 0 ).getCells() ) cell.setFixedHeight( height >= 0.0f ? height : -1.0f ); cell.setColumn( ColumnText.duplicate( t ) );
for ( PdfPCell cell : layoutTable.getRow( 0 ).getCells() ) cell.setFixedHeight( height >= 0.0f ? height : -1.0f ); cell.setColumn( ColumnText.duplicate( t ) );
private PdfPCell createCell(String content, int alignment) { PdfPCell cell = new PdfPCell(); cell.setFixedHeight(30f); float border = 0.2f; cell.setPhrase(new Phrase(content, FontUtils.getDejavuRegular9Dark())); cell.setHorizontalAlignment(alignment); cell.setBorderWidth(border); cell.disableBorderSide(PdfPCell.RIGHT); cell.disableBorderSide(PdfPCell.LEFT); cell.setPadding(5); return cell; }
cell.setPadding( 0.0f ); cell.setColumn( createColumnText() ); cell.setFixedHeight( height >= 0.0f ? height : -1.0f );
cell.setPadding( 0.0f ); cell.setColumn( createColumnText() ); cell.setFixedHeight( height >= 0.0f ? height : -1.0f );
cell.setPadding( 0.0f ); cell.setColumn( createColumnText() ); cell.setFixedHeight( height >= 0.0f ? height : -1.0f );
cell.setPadding( 0.0f ); cell.setColumn( createColumnText() ); cell.setFixedHeight( height >= 0.0f ? height : -1.0f );
private void addPlaceForComments(Document document, Locale locale) throws DocumentException { PdfPTable table = new PdfPTable(1); table.setWidthPercentage(100f); Paragraph paragraph = new Paragraph(new Phrase(translationService.translate( "materialFlowResources.dispositionOrder.comments", locale), FontUtils.getDejavuBold7Dark())); paragraph.setAlignment(Element.ALIGN_LEFT); paragraph.setSpacingAfter(6f); document.add(paragraph); PdfPCell cell1 = new PdfPCell(new Paragraph("")); cell1.setBorder(Rectangle.BOX); cell1.setFixedHeight(60f); table.addCell(cell1); document.add(table); document.add(Chunk.NEWLINE); document.add(Chunk.NEWLINE); }
Float rowHeight = tableRowProperties.getRowHeight(); if (rowHeight != null) { super.setFixedHeight(rowHeight);
if ( rowHeight != null ) super.setFixedHeight( rowHeight );