iText 8.0.5 API
|
A Table is a layout element that represents data in a two-dimensional grid. More...
Classes |
|
class | RowRange |
A simple object which holds the row numbers of a section of a table. More... |
|
Public Member Functions |
|
Table (float[] columnWidths, bool largeTable) | |
Constructs a Table with the preferable column widths. More... |
|
Table (UnitValue[] columnWidths, bool largeTable) | |
Constructs a Table with the preferable column widths. More... |
|
Table (UnitValue[] columnWidths) | |
Constructs a Table with the preferable column widths. More... |
|
Table (float[] pointColumnWidths) | |
Constructs a Table with the preferable column widths. More... |
|
Table (int numColumns, bool largeTable) | |
Constructs a Table with specified number of columns. More... |
|
Table (int numColumns) | |
Constructs a Table with specified number of columns. More... |
|
virtual iText.Layout.Element.Table | SetFixedLayout () |
Set fixed layout. More... |
|
virtual iText.Layout.Element.Table | SetAutoLayout () |
Set auto layout. More... |
|
virtual iText.Layout.Element.Table | UseAllAvailableWidth () |
Set iText.Layout.Properties.Property.WIDTH = 100%. More... |
|
virtual UnitValue | GetColumnWidth (int column) |
Returns the column width for the specified column. More... |
|
virtual int | GetNumberOfColumns () |
Returns the number of columns. More... |
|
virtual int | GetNumberOfRows () |
Returns the number of rows. More... |
|
virtual iText.Layout.Element.Table | AddHeaderCell (Cell headerCell) |
Adds a new cell to the header of the table. More... |
|
virtual iText.Layout.Element.Table | AddHeaderCell< T > (BlockElement< T > blockElement) |
Adds a new cell with received blockElement as a content to the header of the table. More... |
|
virtual iText.Layout.Element.Table | AddHeaderCell (Image image) |
Adds a new cell with received image to the header of the table. More... |
|
virtual iText.Layout.Element.Table | AddHeaderCell (String content) |
Adds a new cell with received string as a content to the header of the table. More... |
|
virtual iText.Layout.Element.Table | GetHeader () |
Gets the header of the table. More... |
|
virtual iText.Layout.Element.Table | AddFooterCell (Cell footerCell) |
Adds a new cell to the footer of the table. More... |
|
virtual iText.Layout.Element.Table | AddFooterCell< T > (BlockElement< T > blockElement) |
Adds a new cell with received blockElement as a content to the footer of the table. More... |
|
virtual iText.Layout.Element.Table | AddFooterCell (Image image) |
Adds a new cell with received image as a content to the footer of the table. More... |
|
virtual iText.Layout.Element.Table | AddFooterCell (String content) |
Adds a new cell with received string as a content to the footer of the table. More... |
|
virtual iText.Layout.Element.Table | GetFooter () |
Gets the footer of the table. More... |
|
virtual bool | IsSkipFirstHeader () |
Tells you if the first header needs to be skipped (for instance if the header says "continued from the previous page"). More... |
|
virtual iText.Layout.Element.Table | SetSkipFirstHeader (bool skipFirstHeader) |
Skips the printing of the first header. More... |
|
virtual bool | IsSkipLastFooter () |
Tells you if the last footer needs to be skipped (for instance if the footer says "continued on the next page") More... |
|
virtual iText.Layout.Element.Table | SetSkipLastFooter (bool skipLastFooter) |
Skips the printing of the last footer. More... |
|
virtual iText.Layout.Element.Table | SetCaption (Div caption) |
Sets the table's caption. More... |
|
virtual iText.Layout.Element.Table | SetCaption (Div caption, CaptionSide side) |
Sets the table's caption and its caption side. More... |
|
virtual Div | GetCaption () |
Gets the table's caption. More... |
|
virtual iText.Layout.Element.Table | StartNewRow () |
Starts new row. More... |
|
virtual iText.Layout.Element.Table | AddCell (Cell cell) |
Adds a new cell to the table. More... |
|
virtual iText.Layout.Element.Table | AddCell< T > (BlockElement< T > blockElement) |
Adds a new cell with received blockElement as a content. More... |
|
virtual iText.Layout.Element.Table | AddCell (Image image) |
Adds a new cell with received image as a content. More... |
|
virtual iText.Layout.Element.Table | AddCell (String content) |
Adds a new cell with received string as a content. More... |
|
virtual Cell | GetCell (int row, int column) |
Returns a cell as specified by its location. More... |
|
override IRenderer | CreateRendererSubTree () |
Creates a renderer subtree with root in the current table element. More... |
|
override IRenderer | GetRenderer () |
Gets a table renderer for this element. More... |
|
virtual bool | IsComplete () |
Checks whether an element has already been marked as complete. More... |
|
virtual void | Complete () |
Indicates that all the desired content has been added to this large element and no more content will be added. More... |
|
virtual void | Flush () |
Writes the newly added content to the document. More... |
|
virtual void | FlushContent () |
Flushes the content which has just been added to the document. More... |
|
virtual void | SetDocument (Document document) |
Sets the document this element is bound to. More... |
|
virtual IList< Border > | GetLastRowBottomBorder () |
Gets the markup properties of the bottom border of the (current) last row. More... |
|
virtual iText.Layout.Element.Table | SetExtendBottomRow (bool isExtended) |
Defines whether the Table should be extended to occupy all the space left in the available area in case it is the last element in this area. More... |
|
virtual iText.Layout.Element.Table | SetExtendBottomRowOnSplit (bool isExtended) |
Defines whether the Table should be extended to occupy all the space left in the available area in case the area has been split and it is the last element in the split part of this area. More... |
|
virtual iText.Layout.Element.Table | SetBorderCollapse (BorderCollapsePropertyValue collapsePropertyValue) |
Sets the type of border collapse. More... |
|
virtual iText.Layout.Element.Table | SetHorizontalBorderSpacing (float spacing) |
Sets the horizontal spacing between this table 's cells. More... |
|
virtual iText.Layout.Element.Table | SetVerticalBorderSpacing (float spacing) |
Sets the vertical spacing between this table 's cells. More... |
|
override AccessibilityProperties | GetAccessibilityProperties () |
Gets the accessibility properties. More... |
|
Public Member Functions inherited from iText.Layout.Element.BlockElement< iText.Layout.Element.Table > | |
override T1 | GetDefaultProperty< T1 > (int property) |
Gets the default property from this entity. More... |
|
virtual UnitValue | GetMarginLeft () |
Gets the current left margin width of the element. More... |
|
virtual T | SetMarginLeft (float value) |
Sets the left margin width of the element. More... |
|
virtual UnitValue | GetMarginRight () |
Gets the current right margin width of the element. More... |
|
virtual T | SetMarginRight (float value) |
Sets the right margin width of the element. More... |
|
virtual UnitValue | GetMarginTop () |
Gets the current top margin width of the element. More... |
|
virtual T | SetMarginTop (float value) |
Sets the top margin width of the element. More... |
|
virtual UnitValue | GetMarginBottom () |
Gets the current bottom margin width of the element. More... |
|
virtual T | SetMarginBottom (float value) |
Sets the bottom margin width of the element. More... |
|
virtual T | SetMargin (float commonMargin) |
Sets all margins around the element to the same width. More... |
|
virtual T | SetMargins (float marginTop, float marginRight, float marginBottom, float marginLeft) |
Sets the margins around the element to a series of new widths. More... |
|
virtual UnitValue | GetPaddingLeft () |
Gets the current left padding width of the element. More... |
|
virtual T | SetPaddingLeft (float value) |
Sets the left padding width of the element. More... |
|
virtual UnitValue | GetPaddingRight () |
Gets the current right padding width of the element. More... |
|
virtual T | SetPaddingRight (float value) |
Sets the right padding width of the element. More... |
|
virtual UnitValue | GetPaddingTop () |
Gets the current top padding width of the element. More... |
|
virtual T | SetPaddingTop (float value) |
Sets the top padding width of the element. More... |
|
virtual UnitValue | GetPaddingBottom () |
Gets the current bottom padding width of the element. More... |
|
virtual T | SetPaddingBottom (float value) |
Sets the bottom padding width of the element. More... |
|
virtual T | SetPadding (float commonPadding) |
Sets all paddings around the element to the same width. More... |
|
virtual T | SetPaddings (float paddingTop, float paddingRight, float paddingBottom, float paddingLeft) |
Sets the paddings around the element to a series of new widths. More... |
|
virtual T | SetVerticalAlignment (VerticalAlignment? verticalAlignment) |
Sets the vertical alignment of the element. More... |
|
virtual T | SetSpacingRatio (float ratio) |
Sets a ratio which determines in which proportion will word spacing and character spacing be applied when horizontal alignment is justified. More... |
|
virtual ? bool | IsKeepTogether () |
Returns whether the BlockElement |
|
virtual T | SetKeepTogether (bool keepTogether) |
Sets whether the BlockElement |
|
virtual ? bool | IsKeepWithNext () |
Returns whether the end of this BlockElement |
|
virtual T | SetKeepWithNext (bool keepWithNext) |
Sets whether the end of this BlockElement |
|
virtual T | SetRotationAngle (float angleInRadians) |
Sets the rotation radAngle. More... |
|
virtual T | SetRotationAngle (double angleInRadians) |
Sets the rotation angle. More... |
|
virtual T | SetWidth (float width) |
Sets the width property of a block element, measured in points. More... |
|
virtual T | SetWidth (UnitValue width) |
Sets the width property of a block element with a iText.Layout.Properties.UnitValue. More... |
|
virtual UnitValue | GetWidth () |
Gets the width property of a block element. More... |
|
virtual T | SetHeight (UnitValue height) |
Sets the height property of a block element with a iText.Layout.Properties.UnitValue. More... |
|
virtual T | SetHeight (float height) |
Sets the height property a block element as a point-value. More... |
|
virtual UnitValue | GetHeight () |
Gets the height property of a block element. More... |
|
virtual T | SetMaxHeight (float maxHeight) |
Sets the max-height of a block element as point-unit value. More... |
|
virtual T | SetMaxHeight (UnitValue maxHeight) |
Sets the max-height property of a block element with a iText.Layout.Properties.UnitValue. More... |
|
virtual T | SetMinHeight (UnitValue minHeight) |
Sets the min-height property of a block element with a iText.Layout.Properties.UnitValue. More... |
|
virtual T | SetMinHeight (float minHeight) |
Sets the min-height of a block element as point-unit value. More... |
|
virtual T | SetMaxWidth (UnitValue maxWidth) |
Sets the max-width property of a block element with a iText.Layout.Properties.UnitValue. More... |
|
virtual T | SetMaxWidth (float maxWidth) |
Sets the max-width of a block element as point-unit value. More... |
|
virtual T | SetMinWidth (UnitValue minWidth) |
Sets the min-width property of a block element with a iText.Layout.Properties.UnitValue. More... |
|
virtual T | SetMinWidth (float minWidth) |
Sets the min-width of a block element as point-unit value. More... |
|
virtual T | SetNeutralRole () |
Give this element a neutral role. More... |
|
Public Member Functions inherited from iText.Layout.Element.IElement | |
void | SetNextRenderer (IRenderer renderer) |
Overrides the iText.Layout.Renderer.IRenderer instance which will be returned by the next call to the GetRenderer(). More... |
|
Public Member Functions inherited from iText.Layout.IPropertyContainer | |
bool | HasProperty (int property) |
Checks if this entity has the specified property. More... |
|
bool | HasOwnProperty (int property) |
Checks if this entity has the specified property, i.e. if it was set to this very element earlier More... |
|
T1 | GetProperty< T1 > (int property) |
Gets the property from this entity. More... |
|
T1 | GetOwnProperty< T1 > (int property) |
Gets own property from this entity. More... |
|
T1 | GetDefaultProperty< T1 > (int property) |
Gets the default property from this entity. More... |
|
void | SetProperty (int property, Object value) |
Sets a property for this entity. More... |
|
void | DeleteOwnProperty (int property) |
Deletes the own property of this entity. More... |
|
Package Functions |
|
override IRenderer | MakeNewRenderer () |
virtual IList< Table.RowRange > | GetRowGroups () |
Returns the list of all row groups. More... |
|
Package Functions inherited from iText.Layout.Element.BlockElement< iText.Layout.Element.Table > | |
BlockElement () | |
Creates a BlockElement. More... |
|
Package Attributes |
|
DefaultAccessibilityProperties | tagProperties |
A Table is a layout element that represents data in a two-dimensional grid.
A Table is a layout element that represents data in a two-dimensional grid. It is filled with cells , ordered in rows and columns.
It is an implementation of ILargeElement , which means it can be flushed to the canvas, in order to reclaim memory that is locked up.
|
inline |
Constructs a Table
with the preferable column widths.
Constructs a Table
with the preferable column widths.
Since 7.0.2 table layout algorithms were introduced. Auto layout is default, except large tables. For large table 100% width and fixed layout set implicitly.
Note, the eventual columns width depends on selected layout, table width, cell's width, cell's min-widths, and cell's max-widths. Table layout algorithm has the same behaviour as expected for CSS table-layout property, where columnWidths is
columnWidths | preferable column widths in points. Values must be greater than or equal to zero, otherwise it will be interpreted as undefined. |
largeTable | whether parts of the table will be written before all data is added. Note, large table does not support auto layout, table width shall not be removed. |
|
inline |
Constructs a Table
with the preferable column widths.
Constructs a Table
with the preferable column widths.
Since 7.0.2 table layout algorithms were introduced. Auto layout is default, except large tables. For large table 100% width and fixed layout set implicitly.
Note, the eventual columns width depends on selected layout, table width, cell's width, cell's min-widths, and cell's max-widths. Table layout algorithm has the same behaviour as expected for CSS table-layout property, where columnWidths is
columnWidths | preferable column widths, points and/or percents. Values must be greater than or equal to zero, otherwise it will be interpreted as undefined. |
largeTable | whether parts of the table will be written before all data is added. Note, large table does not support auto layout, table width shall not be removed. |
|
inline |
Constructs a Table
with the preferable column widths.
Constructs a Table
with the preferable column widths.
Since 7.0.2 table layout algorithms were introduced. Auto layout is default.
Note, the eventual columns width depends on selected layout, table width, cell's width, cell's min-widths, and cell's max-widths. Table layout algorithm has the same behaviour as expected for CSS table-layout property, where columnWidths is
columnWidths | preferable column widths, points and/or percents. Values must be greater than or equal to zero, otherwise it will be interpreted as undefined. |
|
inline |
Constructs a Table
with the preferable column widths.
Constructs a Table
with the preferable column widths.
Since 7.0.2 table layout algorithms were introduced. Auto layout is default.
Note, the eventual columns width depends on selected layout, table width, cell's width, cell's min-widths, and cell's max-widths. Table layout algorithm has the same behaviour as expected for CSS table-layout property, where columnWidths
is
pointColumnWidths | preferable column widths in points. Values must be greater than or equal to zero, otherwise it will be interpreted as undefined. |
|
inline |
Constructs a Table
with specified number of columns.
Constructs a Table
with specified number of columns. The final column widths depend on selected table layout.
Since 7.0.2 table layout algorithms were introduced. Auto layout is default, except large tables. For large table fixed layout set implicitly.
Since 7.1 table will have undefined column widths, that will be determined during layout. In oder to set equal percent width as column width, use iText.Layout.Properties.UnitValue.CreatePercentArray(int)
Note, the eventual columns width depends on selected layout, table width, cell's width, cell's min-widths, and cell's max-widths. Table layout algorithm has the same behaviour as expected for CSS table-layout property, where columnWidths
is
numColumns | the number of columns, each column will have equal percent width. |
largeTable | whether parts of the table will be written before all data is added. Note, large table does not support auto layout, table width shall not be removed. |
|
inline |
Constructs a Table
with specified number of columns.
Constructs a Table
with specified number of columns. The final column widths depend on selected table layout.
Since 7.0.2 table layout was introduced. Auto layout is default, except large tables. For large table fixed layout set implicitly.
Since 7.1 table will have undefined column widths, that will be determined during layout. In oder to set equal percent width as column width, use iText.Layout.Properties.UnitValue.CreatePercentArray(int)
Note, the eventual columns width depends on selected layout, table width, cell's width, cell's min-widths, and cell's max-widths. Table layout algorithm has the same behaviour as expected for CSS table-layout property, where columnWidths
is
numColumns | the number of columns, each column will have equal percent width. |
|
inlinevirtual |
Adds a new cell to the table.
Adds a new cell to the table. The implementation decides for itself which row the cell will be placed on.
cell |
Cell
to add.
|
inlinevirtual |
Adds a new cell with received image as a content.
image | an image to add to the cell and then to the table |
|
inlinevirtual |
Adds a new cell with received string as a content.
content | a string to add to the cell and then to the table |
|
inlinevirtual |
Adds a new cell with received blockElement as a content.
blockElement | a blockElement to add to the cell and then to the table |
T | IElement instance |
T | : | IElement |
|
inlinevirtual |
Adds a new cell to the footer of the table.
Adds a new cell to the footer of the table. The footer will be displayed in the bottom of every area of this table. See also SetSkipLastFooter(bool).
footerCell | a footer cell |
|
inlinevirtual |
Adds a new cell with received image as a content to the footer of the table.
Adds a new cell with received image as a content to the footer of the table. The footer will be displayed in the bottom of every area of this table. See also SetSkipLastFooter(bool).
image | an image to be added to a footer cell |
|
inlinevirtual |
Adds a new cell with received string as a content to the footer of the table.
Adds a new cell with received string as a content to the footer of the table. The footer will be displayed in the bottom of every area of this table. See also SetSkipLastFooter(bool).
content | a content string to be added to a footer cell |
|
inlinevirtual |
Adds a new cell with received blockElement as a content to the footer of the table.
Adds a new cell with received blockElement as a content to the footer of the table. The footer will be displayed in the bottom of every area of this table. See also SetSkipLastFooter(bool).
blockElement | an element to be added to a footer cell |
T | IElement instance |
T | : | IElement |
|
inlinevirtual |
Adds a new cell to the header of the table.
Adds a new cell to the header of the table. The header will be displayed in the top of every area of this table. See also SetSkipFirstHeader(bool).
headerCell | a header cell to be added |
|
inlinevirtual |
Adds a new cell with received image to the header of the table.
Adds a new cell with received image to the header of the table. The header will be displayed in the top of every area of this table. See also SetSkipFirstHeader(bool).
image | an element to be added to a header cell |
|
inlinevirtual |
Adds a new cell with received string as a content to the header of the table.
Adds a new cell with received string as a content to the header of the table. The header will be displayed in the top of every area of this table. See also SetSkipFirstHeader(bool).
content | a string to be added to a header cell |
|
inlinevirtual |
Adds a new cell with received blockElement as a content to the header of the table.
Adds a new cell with received blockElement as a content to the header of the table. The header will be displayed in the top of every area of this table. See also SetSkipFirstHeader(bool).
blockElement | an element to be added to a header cell |
T | any IElement |
T | : | IElement |
|
inlinevirtual |
Indicates that all the desired content has been added to this large element and no more content will be added.
Indicates that all the desired content has been added to this large element and no more content will be added. After this method is called, more precise rendering is activated. For instance, a table may have a SetSkipLastFooter(bool) method set to true, and in case of large table on Flush() we do not know if any more content will be added, so we might not place the content in the bottom of the page where it would fit, but instead add a footer, and place that content in the start of the page. Technically such result would look all right, but it would be more concise if we placed the content in the bottom and did not start new page. For such cases to be renderered more accurately, one can call complete() when some content is still there and not flushed.
Implements iText.Layout.Element.ILargeElement.
|
inline |
Creates a renderer subtree with root in the current table element.
Creates a renderer subtree with root in the current table element. Compared to GetRenderer() , the renderer returned by this method should contain all the child renderers for children of the current element.
Implements iText.Layout.Element.IElement.
|
inlinevirtual |
Writes the newly added content to the document.
Implements iText.Layout.Element.ILargeElement.
|
inlinevirtual |
Flushes the content which has just been added to the document.
Flushes the content which has just been added to the document. This is a method for internal usage and is called automatically by the document.
Implements iText.Layout.Element.ILargeElement.
|
inlinevirtual |
Gets the accessibility properties.
Gets the accessibility properties . See also IAccessibleElement.
Implements iText.Layout.Element.BlockElement< iText.Layout.Element.Table >.
|
inlinevirtual |
Gets the table's caption.
|
inlinevirtual |
Returns a cell as specified by its location.
Returns a cell as specified by its location. If the cell is in a col-span or row-span and is not the top left cell, then null
is returned.
row | the row of the cell. indexes are zero-based |
column | the column of the cell. indexes are zero-based |
|
inlinevirtual |
Returns the column width for the specified column.
column | index of the column |
|
inlinevirtual |
Gets the footer of the table.
Gets the footer of the table. The footer is represented as a distinct table and might have its own properties.
null
, if AddFooterCell(Cell) hasn't been called.
|
inlinevirtual |
Gets the header of the table.
Gets the header of the table. The header is represented as a distinct table and might have its own properties.
null
, if AddHeaderCell(Cell) hasn't been called.
|
inlinevirtual |
Gets the markup properties of the bottom border of the (current) last row.
|
inlinevirtual |
Returns the number of columns.
|
inlinevirtual |
Returns the number of rows.
|
inline |
Gets a table renderer for this element.
Gets a table renderer for this element. Note that this method can be called more than once. By default each element should define its own renderer, but the renderer can be overridden by AbstractElement
Implements iText.Layout.Element.IElement.
|
inlinepackagevirtual |
Returns the list of all row groups.
|
inlinevirtual |
Checks whether an element has already been marked as complete.
Implements iText.Layout.Element.ILargeElement.
|
inlinevirtual |
Tells you if the first header needs to be skipped (for instance if the header says "continued from the previous page").
|
inlinevirtual |
Tells you if the last footer needs to be skipped (for instance if the footer says "continued on the next page")
|
inlinevirtual |
Set auto layout.
Set auto layout. Analog of table-layout:auto
CSS property.
Note, large table does not support auto layout.
Algorithm principles.
|
inlinevirtual |
Sets the type of border collapse.
collapsePropertyValue |
iText.Layout.Properties.BorderCollapsePropertyValue to be set as the border collapse type
|
inlinevirtual |
Sets the table's caption.
Sets the table's caption. If there is no iText.Layout.Properties.Property.CAPTION_SIDE set (note that it's an inheritable property), iText.Layout.Properties.CaptionSide.TOP will be used. Also the iText.Kernel.Pdf.Tagging.StandardRoles.CAPTION will be set on the element.
caption | The element to be set as a caption. |
|
inlinevirtual |
Sets the table's caption and its caption side.
Sets the table's caption and its caption side. Also the iText.Kernel.Pdf.Tagging.StandardRoles.CAPTION will be set on the element.
caption | The element to be set as a caption. |
side | The caption side to be set on the caption. |
|
inlinevirtual |
Sets the document this element is bound to.
Sets the document this element is bound to. We cannot write a large element into several documents simultaneously because we would need more bulky interfaces for this feature. For now we went for simplicity.
document | the document |
Implements iText.Layout.Element.ILargeElement.
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
Set fixed layout.
Set fixed layout. Analog of table-layout:fixed
CSS property. Note, the table must have width property, otherwise auto layout will be used.
Algorithm description
element in HTML. width/colspan
. remainWidth/colspan
to each column.
|
inlinevirtual |
|
inlinevirtual |
Skips the printing of the first header.
Skips the printing of the first header. Used when printing tables in succession belonging to the same printed table aspect.
skipFirstHeader | New value of property skipFirstHeader. |
|
inlinevirtual |
Skips the printing of the last footer.
Skips the printing of the last footer. Used when printing tables in succession belonging to the same printed table aspect.
skipLastFooter | New value of property skipLastFooter. |
|
inlinevirtual |
|
inlinevirtual |
Starts new row.
Starts new row. This mean that next cell will be added at the beginning of next line.
|
inlinevirtual |
Set iText.Layout.Properties.Property.WIDTH = 100%.