Example #1
0
 public PdfPCell createCell(Block block) {
   float[] margins = block.getMargins();
   PdfPCell cell = new PdfPCell();
   cell.setBorderWidth(0);
   cell.setVerticalAlignment(VerticalAlign.getByName(block.getVerticalAlign()).getAlignment());
   cell.setLeft(0);
   cell.setTop(0);
   cell.setRight(0);
   cell.setBottom(0);
   cell.setUseAscender(block.isUseAscender());
   cell.setIndent(0);
   cell.setPaddingLeft(SizeFactory.millimetersToPostscriptPoints(margins[0]));
   cell.setPaddingBottom(SizeFactory.millimetersToPostscriptPoints(margins[3]));
   cell.setPaddingRight(SizeFactory.millimetersToPostscriptPoints(margins[1]));
   cell.setPaddingTop(SizeFactory.millimetersToPostscriptPoints(margins[2]));
   cell.setFixedHeight(SizeFactory.millimetersToPostscriptPoints(block.getPosition()[3]));
   cell.setBorder(0);
   cell.setCellEvent(new CellBlockEvent().createEvent(block));
   cell.setRotation(block.getRotation());
   return cell;
 }