code: @Override
     public final void tableLayout(PdfPTable table, float[][] widths, float[] heights, int headerRows, int rowStart, PdfContentByte[] canvases) {
        final int footer = widths.length - table.getFooterRows();
        final int header = table.getHeaderRows();
        int columns = widths[header].length - 1;
        float w = widths[header][columns];
        try {
           tableForeground = isBg() ? canvases[PdfPTable.BASECANVAS] : canvases[PdfPTable.TEXTCANVAS];
           draw(new Rectangle(widths[header][0], heights[footer - 1], w, heights[header]), null);
           tableForeground = null;
        } catch (VectorPrintException ex) {
           throw new VectorPrintRuntimeException(ex);
        }
     }
docs: An advanced styler may be added as event to a table 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 TABLE. This enables drawing near a table.
  Calls {@link #draw(com.itextpdf.text.Rectangle, java.lang.String) } with the rectangle of the table and null as genericTag.
  
  @see EVENTMODE#TABLE
  @param table
  @param widths
  @param heights
  @param headerRows
  @param rowStart
  @param canvases