Table
Overview
Table is a class in Aspose.Pdf FOSS for Java.
Inherits from: BaseParagraph.
Represents a table element that can be added to a PDF page’s paragraph collection.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
columnWidths | String | Read | Returns the column widths specification string. |
rows | Rows | Read | Returns the rows collection for this table, creating it lazily if needed. |
defaultCellBorder | BorderInfo | Read | Returns the default border applied to all cells that do not have their own border set. |
border | BorderInfo | Read | Returns the border around the entire table. |
backgroundColor | Color | Read | Returns the background color of the table. |
defaultCellPadding | MarginInfo | Read | Returns the default padding (margin) applied to all cells. |
repeatingRowsCount | int | Read | Returns the number of rows at the top of the table that should repeat |
| when the table spans multiple pages. | |||
columnAdjustment | double | Read | Returns the column width adjustment factor. |
broken | boolean | Read | Returns whether the table is broken across pages. |
left | double | Read | Returns the left position offset in points. |
top | double | Read | Returns the top position offset in points. |
cornerStyle | BorderCornerStyle | Read | Returns the corner style for the table border. |
margin | MarginInfo | Read | Gets the margin information for this paragraph. |
horizontalAlignment | HorizontalAlignment | Read | Gets the horizontal alignment of this paragraph within its container. |
inLineParagraph | boolean | Read | Returns whether this paragraph is an inline element. |
keptWithNext | boolean | Read | Returns whether this paragraph should be kept together with the next paragraph |
| on the same page during layout. | |||
firstParagraphInColumn | boolean | Read | Returns whether this paragraph is the first in its column. |
inNewPage | boolean | Read | Returns whether this paragraph should start on a new page during layout. |
hyperlink | Hyperlink | Read | Returns the hyperlink attached to this paragraph (web, local or file |
| target), or {@code null} if the paragraph is not clickable. |
Methods
| Signature | Description |
|---|---|
Table() | Creates a new empty Table with default settings. |
getColumnWidths() → String | Returns the column widths specification string. |
setColumnWidths(columnWidths: String) | Sets the column widths as a space-separated string of point values. |
getRows() → Rows | Returns the rows collection for this table, creating it lazily if needed. |
setRows(rows: Rows) | Sets the rows collection for this table. |
getDefaultCellBorder() → BorderInfo | Returns the default border applied to all cells that do not have their own border set. |
setDefaultCellBorder(defaultCellBorder: BorderInfo) | Sets the default border applied to all cells that do not have their own border set. |
getBorder() → BorderInfo | Returns the border around the entire table. |
setBorder(border: BorderInfo) | Sets the border around the entire table. |
getBackgroundColor() → Color | Returns the background color of the table. |
setBackgroundColor(backgroundColor: Color) | Sets the background color of the table. |
getDefaultCellPadding() → MarginInfo | Returns the default padding (margin) applied to all cells. |
setDefaultCellPadding(defaultCellPadding: MarginInfo) | Sets the default padding (margin) applied to all cells. |
getRepeatingRowsCount() → int | Returns the number of rows at the top of the table that should repeat |
| when the table spans multiple pages. | |
setRepeatingRowsCount(repeatingRowsCount: int) | Sets the number of rows at the top of the table that should repeat |
| when the table spans multiple pages. | |
getColumnAdjustment() → double | Returns the column width adjustment factor. |
setColumnAdjustment(columnAdjustment: double) | Sets the column width adjustment factor. |
isBroken() → boolean | Returns whether the table is broken across pages. |
setBroken(broken: boolean) | Sets whether the table can be broken across pages. |
getLeft() → double | Returns the left position offset in points. |
setLeft(left: double) | Sets the left position offset in points. |
getTop() → double | Returns the top position offset in points. |
setTop(top: double) | Sets the top position offset in points. |
getCornerStyle() → BorderCornerStyle | Returns the corner style for the table border. |
setCornerStyle(cornerStyle: BorderCornerStyle) | Sets the corner style for the table border. |
getMargin() → MarginInfo | Gets the margin information for this paragraph. |
setMargin(margin: MarginInfo) | Sets the margin information for this paragraph. |
getHorizontalAlignment() → HorizontalAlignment | Gets the horizontal alignment of this paragraph within its container. |
setHorizontalAlignment(horizontalAlignment: HorizontalAlignment) | Sets the horizontal alignment of this paragraph within its container. |
isInLineParagraph() → boolean | Returns whether this paragraph is an inline element. |
setInLineParagraph(inLineParagraph: boolean) | Sets whether this paragraph should be treated as an inline element. |
isKeptWithNext() → boolean | Returns whether this paragraph should be kept together with the next paragraph |
| on the same page during layout. | |
setKeptWithNext(keptWithNext: boolean) | Sets whether this paragraph should be kept together with the next paragraph |
| on the same page during layout. | |
isFirstParagraphInColumn() → boolean | Returns whether this paragraph is the first in its column. |
setFirstParagraphInColumn(firstParagraphInColumn: boolean) | Sets whether this paragraph is the first in its column. |
isInNewPage() → boolean | Returns whether this paragraph should start on a new page during layout. |
setInNewPage(inNewPage: boolean) | Sets whether this paragraph should start on a new page during layout. |
getHyperlink() → Hyperlink | Returns the hyperlink attached to this paragraph (web, local or file |
| target), or {@code null} if the paragraph is not clickable. | |
setHyperlink(hyperlink: Hyperlink) | Attaches a hyperlink to this paragraph. |