com.itextpdf.text.pdf
Interface PdfPTableEvent

All Known Subinterfaces:
PdfPTableEventAfterSplit, PdfPTableEventSplit
All Known Implementing Classes:
PdfPTableEventForwarder

public interface PdfPTableEvent

An interface that can be used to retrieve the position of cells in PdfPTable.

Author:
Paulo Soares

Method Summary
 void tableLayout(PdfPTable table, float[][] widths, float[] heights, int headerRows, int rowStart, PdfContentByte[] canvases)
          This method is called at the end of the table rendering.
 

Method Detail

tableLayout

void tableLayout(PdfPTable table,
                 float[][] widths,
                 float[] heights,
                 int headerRows,
                 int rowStart,
                 PdfContentByte[] canvases)
This method is called at the end of the table rendering. The text or graphics are added to one of the 4 PdfContentByte contained in canvases.
The indexes to canvases are:

The layers are placed in sequence on top of each other.

The widths and heights have the coordinates of the cells.
The size of the widths array is the number of rows. Each sub-array in widths corresponds to the x column border positions where the first element is the x coordinate of the left table border and the last element is the x coordinate of the right table border. If colspan is not used all the sub-arrays in widths are the same.
For the heights the first element is the y coordinate of the top table border and the last element is the y coordinate of the bottom table border.

Parameters:
table - the PdfPTable in use
widths - an array of arrays with the cells' x positions. It has the length of the number of rows
heights - an array with the cells' y positions. It has a length of the number of rows + 1
headerRows - the number of rows defined for the header.
rowStart - the first row number after the header
canvases - an array of PdfContentByte


Copyright © 2014. All Rights Reserved.