HiraokaHyperTools.iTextSharp-LGPL  0.2.5
iTextSharp.text.Table Class Reference

A Table is a Rectangle that contains Cells, ordered in some kind of matrix. More...

Inheritance diagram for iTextSharp.text.Table:
iTextSharp.text.Rectangle iTextSharp.text.ILargeElement iTextSharp.text.Element iTextSharp.text.IElement iTextSharp.text.IElement

Public Member Functions

 Table (int columns)
 Constructs a Table with a certain number of columns. More...
 
 Table (int columns, int rows)
 Constructs a Table with a certain number of columns and a certain number of Rows. More...
 
override bool Process (IElementListener listener)
 Processes the element by adding it (or the different parts) to an IElementListener. More...
 
override bool IsNestable ()
 
void AddCell (Cell aCell, int row, int column)
 Adds a Cell to the Table at a certain row and column. More...
 
void AddCell (Cell aCell, object aLocation)
 Adds a Cell to the Table at a certain location. More...
 
void AddCell (Cell cell)
 Adds a Cell to the Table. More...
 
void AddCell (Phrase content)
 Adds a Cell to the Table. More...
 
void AddCell (Phrase content, System.Drawing.Point location)
 Adds a Cell to the Table. More...
 
void AddCell (string content)
 Adds a Cell to the Table. More...
 
void AddCell (string content, System.Drawing.Point location)
 Adds a Cell to the Table. More...
 
void InsertTable (Table aTable)
 To put a table within the existing table at the current position generateTable will of course re-arrange the widths of the columns. More...
 
void InsertTable (Table aTable, int row, int column)
 To put a table within the existing table at the given position generateTable will of course re-arrange the widths of the columns. More...
 
void InsertTable (Table aTable, System.Drawing.Point p)
 To put a table within the existing table at the given position generateTable will of course re-arrange the widths of the columns. More...
 
void Complete ()
 Will fill empty cells with valid blank Cells More...
 
void DeleteColumn (int column)
 Deletes a column in this table. More...
 
bool DeleteRow (int row)
 Deletes a row. More...
 
void DeleteAllRows ()
 
bool DeleteLastRow ()
 Deletes the last row in this table. More...
 
int EndHeaders ()
 Marks the last row of the table headers. More...
 
void SetAlignment (string alignment)
 Sets the alignment of this paragraph. More...
 
void SetWidths (int[] widths)
 Sets the widths of the different columns (percentages). More...
 
IEnumerator GetEnumerator ()
 Gets an Iterator of all the Rows. More...
 
object GetElement (int row, int column)
 returns the element at the position row, column (Cast to Cell or Table) More...
 
void AddColumns (int aColumns)
 Gives you the posibility to add columns. More...
 
float[] GetWidths (float left, float totalWidth)
 Gets an array with the positions of the borders between every column. More...
 
override float GetBottom (float margin)
 Returns the lower left y-coordinate, considering a given margin. More...
 
override float GetLeft (float margin)
 Returns the lower left x-coordinate, considering a given margin. More...
 
override float GetRight (float margin)
 Returns the upper right x-coordinate, considering a given margin. More...
 
override float GetTop (float margin)
 Returns the upper right y-coordinate, considering a given margin. More...
 
PdfPTable CreatePdfPTable ()
 
void FlushContent ()
 
- Public Member Functions inherited from iTextSharp.text.Rectangle
 Rectangle (float llx, float lly, float urx, float ury)
 Constructs a Rectangle-object. More...
 
 Rectangle (float urx, float ury)
 Constructs a Rectangle-object starting from the origin (0, 0). More...
 
 Rectangle (Rectangle rect)
 Constructs a Rectangle-object. More...
 
virtual void CloneNonPositionParameters (Rectangle rect)
 
virtual void SoftCloneNonPositionParameters (Rectangle rect)
 
bool IsContent ()
 
virtual void Normalize ()
 
Rectangle GetRectangle (float top, float bottom)
 Gets a Rectangle that is altered to fit on the page. More...
 
Rectangle Rotate ()
 Swaps the values of urx and ury and of lly and llx in order to rotate the rectangle. More...
 
virtual void EnableBorderSide (int side)
 
virtual void DisableBorderSide (int side)
 
bool HasBorders ()
 Indicates if the table has borders. More...
 
bool HasBorder (int type)
 Indicates if the table has a some type of border. More...
 
override String ToString ()
 Gets the content of the text element. More...
 

Protected Attributes

bool convert2pdfptable = false
 
bool notAddedYet = true
 
bool complete = true
 
- Protected Attributes inherited from iTextSharp.text.Rectangle
float llx
 the lower left x-coordinate. More...
 
float lly
 summary> the upper right x-coordinate. More...
 
float urx
 summary> the upper right y-coordinate. More...
 
float ury
 summary> This represents the status of the 4 sides of the rectangle. More...
 
int border = UNDEFINED
 summary> This is the width of the border around this rectangle. More...
 
float borderWidth = UNDEFINED
 summary> This is the color of the border of this rectangle. More...
 
Color borderColor = null
 
Color borderColorLeft = null
 
Color borderColorRight = null
 
Color borderColorTop = null
 
Color borderColorBottom = null
 
float borderWidthLeft = UNDEFINED
 
float borderWidthRight = UNDEFINED
 
float borderWidthTop = UNDEFINED
 
float borderWidthBottom = UNDEFINED
 
bool useVariableBorders = false
 summary> This is the color of the background of this rectangle. More...
 
Color backgroundColor = null
 summary> This is the rotation value of this rectangle. More...
 
int rotation = 0
 

Properties

Cell DefaultLayout [get, set]
 
Cell DefaultCell [get, set]
 
bool AutoFillEmptyCells [set]
 Enables/disables automatic insertion of empty cells before table is rendered. (default = false) More...
 
bool TableFitsPage [get, set]
 Allows you to control when a page break occurs. More...
 
bool CellsFitPage [get, set]
 Allows you to control when a page break occurs. More...
 
float Offset [get, set]
 Get/set the offset of this table. More...
 
override int Type [get]
 Gets the type of the text element. More...
 
int DefaultCellBorder [set]
 Changes the border in the default layout of the Cells added with method AddCell(string content). More...
 
float DefaultCellBorderWidth [set]
 Changes the width of the borders in the default layout of the Cells added with method AddCell(string content). More...
 
Color DefaultCellBorderColor [set]
 Changes the bordercolor in the default layout of the Cells added with method AddCell(string content). More...
 
Color DefaultCellBackgroundColor [set]
 Changes the backgroundcolor in the default layout of the Cells added with method AddCell(string content). More...
 
float DefaultCellGrayFill [set]
 Changes the grayfill in the default layout of the Cells added with method AddCell(string content). More...
 
int DefaultHorizontalAlignment [set]
 Changes the horizontalalignment in the default layout of the Cells added with method AddCell(string content). More...
 
int DefaultVerticalAlignment [set]
 Changes the verticalAlignment in the default layout of the Cells added with method AddCell(string content). More...
 
int DefaultRowspan [set]
 Changes the rowspan in the default layout of the Cells added with method AddCell(string content). More...
 
int DefaultColspan [set]
 Changes the colspan in the default layout of the Cells added with method AddCell(string content). More...
 
int LastHeaderRow [get, set]
 Sets the horizontal Element. More...
 
float Padding [set]
 Sets the cellpadding. More...
 
float Spacing [set]
 Sets the cellspacing. More...
 
float[] Widths [set]
 Sets the widths of the different columns (percentages). More...
 
int Columns [get]
 Gets the number of columns. More...
 
int Size [get]
 Gets the number of rows in this Table. More...
 
float[] ProportionalWidths [get]
 Gets the proportional widths of the columns in this Table. More...
 
int Alignment [get, set]
 Get/set the horizontal Element. More...
 
float Cellpadding [get, set]
 Get/set the cellpadding. More...
 
float Cellspacing [get, set]
 Get/set the cellspacing. More...
 
override float Width [get, set]
 Get/set the table width (a percentage). More...
 
System.Drawing.Dimension Dimension [get]
 Gets the dimension of this table More...
 
int NextRow [get]
 
int NextColumn [get]
 
override float Bottom [get, set]
 
override float Left [get, set]
 
override float Right [get, set]
 
override float Top [get, set]
 
bool Convert2pdfptable [get, set]
 
bool Locked [get, set]
 
bool NotAddedYet [get, set]
 
bool ElementComplete [get, set]
 
- Properties inherited from iTextSharp.text.Rectangle
virtual int Type [get]
 Gets the type of the text element. More...
 
virtual ArrayList Chunks [get]
 Gets all the chunks in this element. More...
 
virtual float Top [get, set]
 Get/set the upper right y-coordinate. More...
 
virtual int Border [get, set]
 Get/set the border More...
 
virtual float GrayFill [get, set]
 Get/set the grayscale of the rectangle. More...
 
virtual float Left [get, set]
 Get/set the lower left x-coordinate. More...
 
virtual float Right [get, set]
 Get/set the upper right x-coordinate. More...
 
virtual float Bottom [get, set]
 Get/set the lower left y-coordinate. More...
 
virtual Color BorderColorBottom [get, set]
 
virtual Color BorderColorTop [get, set]
 
virtual Color BorderColorLeft [get, set]
 
virtual Color BorderColorRight [get, set]
 
virtual float Width [get, set]
 Returns the width of the rectangle. More...
 
float Height [get]
 Returns the height of the rectangle. More...
 
virtual float BorderWidth [get, set]
 Get/set the borderwidth. More...
 
virtual Color BorderColor [get, set]
 Get/set the color of the border. More...
 
virtual Color BackgroundColor [get, set]
 Get/set the backgroundcolor. More...
 
int Rotation [get]
 Returns the rotation More...
 
virtual float BorderWidthLeft [get, set]
 
virtual float BorderWidthRight [get, set]
 
virtual float BorderWidthTop [get, set]
 
virtual float BorderWidthBottom [get, set]
 
virtual bool UseVariableBorders [get, set]
 
- Properties inherited from iTextSharp.text.IElement
int Type [get]
 Gets the type of the text element. More...
 
ArrayList Chunks [get]
 Gets all the chunks in this element. More...
 
- Properties inherited from iTextSharp.text.ILargeElement
bool ElementComplete [get, set]
 

Additional Inherited Members

- Static Public Attributes inherited from iTextSharp.text.Rectangle
const int UNDEFINED = -1
 This is the value that will be used as undefined. More...
 
const int TOP_BORDER = 1
 summary> This represents one side of the border of the Rectangle. More...
 
const int BOTTOM_BORDER = 2
 summary> This represents one side of the border of the Rectangle. More...
 
const int LEFT_BORDER = 4
 summary> This represents one side of the border of the Rectangle. More...
 
const int RIGHT_BORDER = 8
 summary> This represents a rectangle without borders. More...
 
const int NO_BORDER = 0
 summary> This represents a type of border. More...
 
const int BOX = TOP_BORDER + BOTTOM_BORDER + LEFT_BORDER + RIGHT_BORDER
 
- Static Public Attributes inherited from iTextSharp.text.Element
const int HEADER = 0
 This is a possible type of Element. More...
 
const int TITLE = 1
 This is a possible type of Element. More...
 
const int SUBJECT = 2
 This is a possible type of Element. More...
 
const int KEYWORDS = 3
 This is a possible type of Element. More...
 
const int AUTHOR = 4
 This is a possible type of Element. More...
 
const int PRODUCER = 5
 This is a possible type of Element. More...
 
const int CREATIONDATE = 6
 This is a possible type of Element. More...
 
const int CREATOR = 7
 This is a possible type of Element. More...
 
const int CHUNK = 10
 This is a possible type of Element. More...
 
const int PHRASE = 11
 This is a possible type of Element. More...
 
const int PARAGRAPH = 12
 This is a possible type of Element. More...
 
const int SECTION = 13
 This is a possible type of Element More...
 
const int LIST = 14
 This is a possible type of Element More...
 
const int LISTITEM = 15
 This is a possible type of Element More...
 
const int CHAPTER = 16
 This is a possible type of Element More...
 
const int ANCHOR = 17
 This is a possible type of Element More...
 
const int CELL = 20
 This is a possible type of Element. More...
 
const int ROW = 21
 This is a possible type of Element. More...
 
const int TABLE = 22
 This is a possible type of Element. More...
 
const int PTABLE = 23
 This is a possible type of Element. More...
 
const int ANNOTATION = 29
 This is a possible type of Element. More...
 
const int RECTANGLE = 30
 This is a possible type of Element. More...
 
const int JPEG = 32
 This is a possible type of Element. More...
 
const int JPEG2000 = 33
 
const int IMGRAW = 34
 This is a possible type of Element. More...
 
const int IMGTEMPLATE = 35
 This is a possible type of Element. More...
 
const int JBIG2 = 36
 
const int MULTI_COLUMN_TEXT = 40
 This is a possible type of More...
 
const int MARKED = 50
 
const int YMARK = 55
 
const int ALIGN_UNDEFINED = -1
 A possible value for paragraph Element. This specifies that the text is aligned to the left indent and extra whitespace should be placed on the right. More...
 
const int ALIGN_LEFT = 0
 A possible value for paragraph Element. This specifies that the text is aligned to the left indent and extra whitespace should be placed on the right. More...
 
const int ALIGN_CENTER = 1
 A possible value for paragraph Element. This specifies that the text is aligned to the center and extra whitespace should be placed equally on the left and right. More...
 
const int ALIGN_RIGHT = 2
 A possible value for paragraph Element. This specifies that the text is aligned to the right indent and extra whitespace should be placed on the left. More...
 
const int ALIGN_JUSTIFIED = 3
 A possible value for paragraph Element. This specifies that extra whitespace should be spread out through the rows of the paragraph with the text lined up with the left and right indent except on the last line which should be aligned to the left. More...
 
const int ALIGN_TOP = 4
 A possible value for vertical Element. More...
 
const int ALIGN_MIDDLE = 5
 A possible value for vertical Element. More...
 
const int ALIGN_BOTTOM = 6
 A possible value for vertical Element. More...
 
const int ALIGN_BASELINE = 7
 A possible value for vertical Element. More...
 
const int ALIGN_JUSTIFIED_ALL = 8
 Does the same as ALIGN_JUSTIFIED but the last line is also spread out. More...
 
const int CCITTG4 = 0x100
 Pure two-dimensional encoding (Group 4) More...
 
const int CCITTG3_1D = 0x101
 Pure one-dimensional encoding (Group 3, 1-D) More...
 
const int CCITTG3_2D = 0x102
 Mixed one- and two-dimensional encoding (Group 3, 2-D) More...
 
const int CCITT_BLACKIS1 = 1
 A flag indicating whether 1-bits are to be interpreted as black pixels and 0-bits as white pixels, More...
 
const int CCITT_ENCODEDBYTEALIGN = 2
 A flag indicating whether the filter expects extra 0-bits before each encoded line so that the line begins on a byte boundary. More...
 
const int CCITT_ENDOFLINE = 4
 A flag indicating whether end-of-line bit patterns are required to be present in the encoding. More...
 
const int CCITT_ENDOFBLOCK = 8
 A flag indicating whether the filter expects the encoded data to be terminated by an end-of-block pattern, overriding the Rows parameter. The use of this flag will set the key /EndOfBlock to false. More...
 

Detailed Description

A Table is a Rectangle that contains Cells, ordered in some kind of matrix.

Tables that span multiple pages are cut into different parts automatically. If you want a table header to be repeated on every page, you may not forget to mark the end of the header section by using the method EndHeaders().

The matrix of a table is not necessarily an m x n-matrix. It can contain holes or cells that are bigger than the unit. Believe me or not, but it took some serious thinking to make this as userfriendly as possible. I hope you wil find the result quite simple (I love simple solutions, especially for complex problems).

// Remark: You MUST know the number of columns when constructing a Table.
// The number of rows is not important.
<STRONG>Table table = new Table(3);</STRONG>
<STRONG>table.SetBorderWidth(1);</STRONG>
<STRONG>table.SetBorderColor(new Color(0, 0, 255));</STRONG>
<STRONG>table.SetPadding(5);</STRONG>
<STRONG>table.SetSpacing(5);</STRONG>
Cell cell = new Cell("header");
cell.SetHeader(true);
cell.SetColspan(3);
<STRONG>table.AddCell(cell);</STRONG>
<STRONG>table.EndHeaders();</STRONG>
cell = new Cell("example cell with colspan 1 and rowspan 2");
cell.SetRowspan(2);
cell.SetBorderColor(new Color(255, 0, 0));
<STRONG>table.AddCell(cell);</STRONG>
<STRONG>table.AddCell("1.1");</STRONG>
<STRONG>table.AddCell("2.1");</STRONG>
<STRONG>table.AddCell("1.2");</STRONG>
<STRONG>table.AddCell("2.2");</STRONG>
<STRONG>table.AddCell("cell test1");</STRONG>
cell = new Cell("big cell");
cell.SetRowspan(2);
cell.SetColspan(2);
<STRONG>table.AddCell(cell);</STRONG>
<STRONG>table.AddCell("cell test2");</STRONG>
Table(int columns)
Constructs a Table with a certain number of columns.
Definition: Table.cs:234

The result of this code is a table:

header
example cell with colspan 1 and rowspan 2 1.1 2.1
1.2 2.2
cell test1 big cell
cell test2
See also
T:iTextSharp.text.Rectangle, T:iTextSharp.text.Element, T:iTextSharp.text.Row, T:iTextSharp.text.Cell

Constructor & Destructor Documentation

◆ Table() [1/2]

iTextSharp.text.Table.Table ( int  columns)

Constructs a Table with a certain number of columns.

Parameters
columnsThe number of columns in the table

<overloads> Has three overloads </overloads>

◆ Table() [2/2]

iTextSharp.text.Table.Table ( int  columns,
int  rows 
)

Constructs a Table with a certain number of columns and a certain number of Rows.

Parameters
columnsThe number of columns in the table
rowsThe number of rows

<overloads> Has three overloads </overloads>

Member Function Documentation

◆ AddCell() [1/7]

void iTextSharp.text.Table.AddCell ( Cell  aCell,
int  row,
int  column 
)

Adds a Cell to the Table at a certain row and column.

Parameters
aCellThe Cell to add
rowThe row where the Cell will be added
columnThe column where the Cell will be added

◆ AddCell() [2/7]

void iTextSharp.text.Table.AddCell ( Cell  aCell,
object  aLocation 
)

Adds a Cell to the Table at a certain location.

Parameters
aCellThe Cell to add
aLocationThe location where the Cell will be added

◆ AddCell() [3/7]

void iTextSharp.text.Table.AddCell ( Cell  cell)

Adds a Cell to the Table.

Parameters
cella Cell

◆ AddCell() [4/7]

void iTextSharp.text.Table.AddCell ( Phrase  content)

Adds a Cell to the Table.

This is a shortcut for AddCell(Cell cell). The Phrase will be converted to a Cell.

Parameters
contenta Phrase

◆ AddCell() [5/7]

void iTextSharp.text.Table.AddCell ( Phrase  content,
System.Drawing.Point  location 
)

Adds a Cell to the Table.

Parameters
contenta Phrase
locationa System.Drawing.Point

◆ AddCell() [6/7]

void iTextSharp.text.Table.AddCell ( string  content)

Adds a Cell to the Table.

This is a shortcut for AddCell(Cell cell). The string will be converted to a Cell.

Parameters
contenta string

◆ AddCell() [7/7]

void iTextSharp.text.Table.AddCell ( string  content,
System.Drawing.Point  location 
)

Adds a Cell to the Table.

This is a shortcut for AddCell(Cell cell, System.Drawing.Point location). The string will be converted to a Cell.

Parameters
contenta string
locationa point

◆ AddColumns()

void iTextSharp.text.Table.AddColumns ( int  aColumns)

Gives you the posibility to add columns.

Parameters
aColumnsthe number of columns to add

◆ Complete()

void iTextSharp.text.Table.Complete ( )

Will fill empty cells with valid blank Cells

◆ CreatePdfPTable()

PdfPTable iTextSharp.text.Table.CreatePdfPTable ( )

Create a PdfPTable based on this Table object.

Returns
a PdfPTable object
Exceptions
BadElementException

◆ DeleteAllRows()

void iTextSharp.text.Table.DeleteAllRows ( )

Deletes all rows in this table. (contributed by dpere.nosp@m.zcar.nosp@m.@fcc..nosp@m.es)

◆ DeleteColumn()

void iTextSharp.text.Table.DeleteColumn ( int  column)

Deletes a column in this table.

Parameters
columnthe number of the column that has to be deleted

◆ DeleteLastRow()

bool iTextSharp.text.Table.DeleteLastRow ( )

Deletes the last row in this table.

Returns
true if the row was deleted; false if not

◆ DeleteRow()

bool iTextSharp.text.Table.DeleteRow ( int  row)

Deletes a row.

Parameters
rowthe number of the row to delete
Returns
true if the row was deleted; false if not

◆ EndHeaders()

int iTextSharp.text.Table.EndHeaders ( )

Marks the last row of the table headers.

Returns
the number of the last row of the table headers

◆ FlushContent()

void iTextSharp.text.Table.FlushContent ( )
Since
iText 2.0.8
See also
com.lowagie.text.LargeElement::flushContent()

Implements iTextSharp.text.ILargeElement.

◆ GetBottom()

override float iTextSharp.text.Table.GetBottom ( float  margin)
virtual

Returns the lower left y-coordinate, considering a given margin.

Parameters
margina margin
Returns
the lower left y-coordinate

Reimplemented from iTextSharp.text.Rectangle.

◆ GetElement()

object iTextSharp.text.Table.GetElement ( int  row,
int  column 
)

returns the element at the position row, column (Cast to Cell or Table)

Parameters
row
column
Returns
an object

◆ GetEnumerator()

IEnumerator iTextSharp.text.Table.GetEnumerator ( )

Gets an Iterator of all the Rows.

Returns
an IEnumerator

◆ GetLeft()

override float iTextSharp.text.Table.GetLeft ( float  margin)
virtual

Returns the lower left x-coordinate, considering a given margin.

Parameters
margina margin
Returns
the lower left x-coordinate

Reimplemented from iTextSharp.text.Rectangle.

◆ GetRight()

override float iTextSharp.text.Table.GetRight ( float  margin)
virtual

Returns the upper right x-coordinate, considering a given margin.

Parameters
margina margin
Returns
the upper right x-coordinate

Reimplemented from iTextSharp.text.Rectangle.

◆ GetTop()

override float iTextSharp.text.Table.GetTop ( float  margin)
virtual

Returns the upper right y-coordinate, considering a given margin.

Parameters
margina margin
Returns
the upper right y-coordinate

Reimplemented from iTextSharp.text.Rectangle.

◆ GetWidths()

float [] iTextSharp.text.Table.GetWidths ( float  left,
float  totalWidth 
)

Gets an array with the positions of the borders between every column.

This method translates the widths expressed in percentages into the x-coordinate of the borders of the columns on a real document.

Parameters
leftthis is the position of the first border at the left (cellpadding not included)
totalWidththis is the space between the first border at the left and the last border at the right (cellpadding not included)
Returns
an array with borderpositions

◆ InsertTable() [1/3]

void iTextSharp.text.Table.InsertTable ( Table  aTable)

To put a table within the existing table at the current position generateTable will of course re-arrange the widths of the columns.

Parameters
aTablethe table you want to insert

◆ InsertTable() [2/3]

void iTextSharp.text.Table.InsertTable ( Table  aTable,
int  row,
int  column 
)

To put a table within the existing table at the given position generateTable will of course re-arrange the widths of the columns.

Parameters
aTableThe Table to add
rowThe row where the Cell will be added
columnThe column where the Cell will be added

◆ InsertTable() [3/3]

void iTextSharp.text.Table.InsertTable ( Table  aTable,
System.Drawing.Point  p 
)

To put a table within the existing table at the given position generateTable will of course re-arrange the widths of the columns.

Parameters
aTablethe table you want to insert
aLocationa System.Drawing.Point

◆ IsNestable()

override bool iTextSharp.text.Table.IsNestable ( )
virtual

Gets all the chunks in this element.

Returns
an ArrayList
See also
com.lowagie.text.Element::isNestable()
Since
iText 2.0.8

Reimplemented from iTextSharp.text.Rectangle.

◆ Process()

override bool iTextSharp.text.Table.Process ( IElementListener  listener)
virtual

Processes the element by adding it (or the different parts) to an IElementListener.

Parameters
listeneran IElementListener
Returns
true if the element was processed successfully

Reimplemented from iTextSharp.text.Rectangle.

◆ SetAlignment()

void iTextSharp.text.Table.SetAlignment ( string  alignment)

Sets the alignment of this paragraph.

Parameters
alignmentthe new alignment as a string

◆ SetWidths()

void iTextSharp.text.Table.SetWidths ( int[]  widths)

Sets the widths of the different columns (percentages).

You can give up relative values of borderwidths. The sum of these values will be considered 100%. The values will be recalculated as percentages of this sum.

Parameters
widthsan array with values

Member Data Documentation

◆ complete

bool iTextSharp.text.Table.complete = true
protected

Indicates if the PdfPTable is complete once added to the document.

Since
iText 2.0.8

◆ convert2pdfptable

bool iTextSharp.text.Table.convert2pdfptable = false
protected

if you want to generate tables the old way, set this value to false.

◆ notAddedYet

bool iTextSharp.text.Table.notAddedYet = true
protected

Indicates if this is the first time the section was added.

Since
iText 2.0.8

Property Documentation

◆ Alignment

int iTextSharp.text.Table.Alignment
getset

Get/set the horizontal Element.

a value

◆ AutoFillEmptyCells

bool iTextSharp.text.Table.AutoFillEmptyCells
set

Enables/disables automatic insertion of empty cells before table is rendered. (default = false)

As some people may want to create a table, fill only a couple of the cells and don't bother with investigating which empty ones need to be added, this default behaviour may be very welcome. Disabling is recommended to increase speed. (empty cells should be added through extra code then)

enable/disable autofill

◆ Bottom

override float iTextSharp.text.Table.Bottom
getset

◆ Cellpadding

float iTextSharp.text.Table.Cellpadding
getset

Get/set the cellpadding.

the cellpadding

◆ CellsFitPage

bool iTextSharp.text.Table.CellsFitPage
getset

Allows you to control when a page break occurs.

When a cell doesn't fit a page, it is split in two parts. If you want to avoid this, you should set the cellsFitPage value to true.

a value

◆ Cellspacing

float iTextSharp.text.Table.Cellspacing
getset

Get/set the cellspacing.

the cellspacing

◆ Columns

int iTextSharp.text.Table.Columns
get

Gets the number of columns.

a value

◆ Convert2pdfptable

bool iTextSharp.text.Table.Convert2pdfptable
getset

If set to true, iText will try to convert the Table to a PdfPTable.

Parameters
convert2pdfptabletrue if you want iText to try to convert the Table to a PdfPTable

◆ DefaultCell

Cell iTextSharp.text.Table.DefaultCell
getset

Sets the default layout of the Table to the provided Cell

Parameters
valuea cell with all the defaults

◆ DefaultCellBackgroundColor

Color iTextSharp.text.Table.DefaultCellBackgroundColor
set

Changes the backgroundcolor in the default layout of the Cells added with method AddCell(string content).

the new color

◆ DefaultCellBorder

int iTextSharp.text.Table.DefaultCellBorder
set

Changes the border in the default layout of the Cells added with method AddCell(string content).

the new border value

◆ DefaultCellBorderColor

Color iTextSharp.text.Table.DefaultCellBorderColor
set

Changes the bordercolor in the default layout of the Cells added with method AddCell(string content).

◆ DefaultCellBorderWidth

float iTextSharp.text.Table.DefaultCellBorderWidth
set

Changes the width of the borders in the default layout of the Cells added with method AddCell(string content).

the new width

◆ DefaultCellGrayFill

float iTextSharp.text.Table.DefaultCellGrayFill
set

Changes the grayfill in the default layout of the Cells added with method AddCell(string content).

the new value

◆ DefaultColspan

int iTextSharp.text.Table.DefaultColspan
set

Changes the colspan in the default layout of the Cells added with method AddCell(string content).

the new colspan value

◆ DefaultHorizontalAlignment

int iTextSharp.text.Table.DefaultHorizontalAlignment
set

Changes the horizontalalignment in the default layout of the Cells added with method AddCell(string content).

the new alignment value

◆ DefaultLayout

Cell iTextSharp.text.Table.DefaultLayout
getset

Sets the default layout of the Table to the provided Cell

Parameters
valuea cell with all the defaults

◆ DefaultRowspan

int iTextSharp.text.Table.DefaultRowspan
set

Changes the rowspan in the default layout of the Cells added with method AddCell(string content).

the new rowspan value

◆ DefaultVerticalAlignment

int iTextSharp.text.Table.DefaultVerticalAlignment
set

Changes the verticalAlignment in the default layout of the Cells added with method AddCell(string content).

the new alignment value

◆ Dimension

System.Drawing.Dimension iTextSharp.text.Table.Dimension
get

Gets the dimension of this table

the dimension

◆ ElementComplete

bool iTextSharp.text.Table.ElementComplete
getset
Since
iText 2.0.8
See also
com.lowagie.text.LargeElement::isComplete()

◆ LastHeaderRow

int iTextSharp.text.Table.LastHeaderRow
getset

Sets the horizontal Element.

the new value

◆ Left

override float iTextSharp.text.Table.Left
getset

◆ Locked

bool iTextSharp.text.Table.Locked
getset

◆ NextColumn

int iTextSharp.text.Table.NextColumn
get

Returns the next column 0-based index where a new cell would be added. (contributed by dpere.nosp@m.zcar.nosp@m.@fcc..nosp@m.es)

Returns
y coordinate for the next row

◆ NextRow

int iTextSharp.text.Table.NextRow
get

Returns the next row 0-based index where a new cell would be added. (contributed by dpere.nosp@m.zcar.nosp@m.@fcc..nosp@m.es)

Returns
x coordinate for the next row

◆ NotAddedYet

bool iTextSharp.text.Table.NotAddedYet
getset

Indicates if this is the first time the section is added.

Since
iText2.0.8
Returns
true if the section wasn't added yet

◆ Offset

float iTextSharp.text.Table.Offset
getset

Get/set the offset of this table.

the space between this table and the previous element.

◆ Padding

float iTextSharp.text.Table.Padding
set

Sets the cellpadding.

the new value

◆ ProportionalWidths

float [] iTextSharp.text.Table.ProportionalWidths
get

Gets the proportional widths of the columns in this Table.

the proportional widths of the columns in this Table

◆ Right

override float iTextSharp.text.Table.Right
getset

◆ Size

int iTextSharp.text.Table.Size
get

Gets the number of rows in this Table.

the number of rows in this Table

◆ Spacing

float iTextSharp.text.Table.Spacing
set

Sets the cellspacing.

the new value

◆ TableFitsPage

bool iTextSharp.text.Table.TableFitsPage
getset

Allows you to control when a page break occurs.

When a table doesn't fit a page, it is split in two parts. If you want to avoid this, you should set the tableFitsPage value to true.

a value

◆ Top

override float iTextSharp.text.Table.Top
getset

◆ Type

override int iTextSharp.text.Table.Type
get

Gets the type of the text element.

a type

◆ Width

override float iTextSharp.text.Table.Width
getset

Get/set the table width (a percentage).

the table width (a percentage)

◆ Widths

float [] iTextSharp.text.Table.Widths
set

Sets the widths of the different columns (percentages).

You can give up relative values of borderwidths. The sum of these values will be considered 100%. The values will be recalculated as percentages of this sum.

float[] widths = {2, 1, 1};
table.SetWidths(widths)

The widths will be: a width of 50% for the first column, 25% for the second and third column.

an array with values


The documentation for this class was generated from the following file: