code: @Override
     public final void cellLayout(PdfPCell cell, Rectangle position, PdfContentByte[] canvases) {
        try {
           tableForeground = isBg() ? canvases[PdfPTable.BASECANVAS] : canvases[PdfPTable.TEXTCANVAS];
           Rectangle box = getValue(USEPADDING, Boolean.class) ? new Rectangle(
               position.getLeft() + cell.getPaddingLeft(),
               position.getBottom() + cell.getPaddingBottom(),
               position.getRight() - cell.getPaddingRight(),
               position.getTop() - cell.getPaddingTop()) : position;
           draw(box, null);
           tableForeground = null;
        } catch (VectorPrintException ex) {
           throw new VectorPrintRuntimeException(ex);
        }
     }
docs: An advanced styler may be added as event to a cell by {@link StyleHelper#style(java.lang.Object, java.lang.Object, java.util.Collection) }
  when the element styled is a table and the {@link EVENTMODE} is ALL or CELL. This enables drawing near a cell.
  Calls {@link #draw(com.itextpdf.text.Rectangle, java.lang.String) } with the rectangle of the cell and null as genericTag. When
  {@link #USEPADDING} is true the rectangle is calculated taking cell padding into account.
  
  @see EVENTMODE#CELL
  @param cell
  @param position
  @param canvases