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

NameTypeAccessDescription
columnWidthsStringReadReturns the column widths specification string.
rowsRowsReadReturns the rows collection for this table, creating it lazily if needed.
defaultCellBorderBorderInfoReadReturns the default border applied to all cells that do not have their own border set.
borderBorderInfoReadReturns the border around the entire table.
backgroundColorColorReadReturns the background color of the table.
defaultCellPaddingMarginInfoReadReturns the default padding (margin) applied to all cells.
repeatingRowsCountintReadReturns the number of rows at the top of the table that should repeat
when the table spans multiple pages.
columnAdjustmentdoubleReadReturns the column width adjustment factor.
brokenbooleanReadReturns whether the table is broken across pages.
leftdoubleReadReturns the left position offset in points.
topdoubleReadReturns the top position offset in points.
cornerStyleBorderCornerStyleReadReturns the corner style for the table border.
marginMarginInfoReadGets the margin information for this paragraph.
horizontalAlignmentHorizontalAlignmentReadGets the horizontal alignment of this paragraph within its container.
inLineParagraphbooleanReadReturns whether this paragraph is an inline element.
keptWithNextbooleanReadReturns whether this paragraph should be kept together with the next paragraph
on the same page during layout.
firstParagraphInColumnbooleanReadReturns whether this paragraph is the first in its column.
inNewPagebooleanReadReturns whether this paragraph should start on a new page during layout.
hyperlinkHyperlinkReadReturns the hyperlink attached to this paragraph (web, local or file
target), or {@code null} if the paragraph is not clickable.

Methods

SignatureDescription
Table()Creates a new empty Table with default settings.
getColumnWidths()StringReturns the column widths specification string.
setColumnWidths(columnWidths: String)Sets the column widths as a space-separated string of point values.
getRows()RowsReturns the rows collection for this table, creating it lazily if needed.
setRows(rows: Rows)Sets the rows collection for this table.
getDefaultCellBorder()BorderInfoReturns 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()BorderInfoReturns the border around the entire table.
setBorder(border: BorderInfo)Sets the border around the entire table.
getBackgroundColor()ColorReturns the background color of the table.
setBackgroundColor(backgroundColor: Color)Sets the background color of the table.
getDefaultCellPadding()MarginInfoReturns the default padding (margin) applied to all cells.
setDefaultCellPadding(defaultCellPadding: MarginInfo)Sets the default padding (margin) applied to all cells.
getRepeatingRowsCount()intReturns 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()doubleReturns the column width adjustment factor.
setColumnAdjustment(columnAdjustment: double)Sets the column width adjustment factor.
isBroken()booleanReturns whether the table is broken across pages.
setBroken(broken: boolean)Sets whether the table can be broken across pages.
getLeft()doubleReturns the left position offset in points.
setLeft(left: double)Sets the left position offset in points.
getTop()doubleReturns the top position offset in points.
setTop(top: double)Sets the top position offset in points.
getCornerStyle()BorderCornerStyleReturns the corner style for the table border.
setCornerStyle(cornerStyle: BorderCornerStyle)Sets the corner style for the table border.
getMargin()MarginInfoGets the margin information for this paragraph.
setMargin(margin: MarginInfo)Sets the margin information for this paragraph.
getHorizontalAlignment()HorizontalAlignmentGets the horizontal alignment of this paragraph within its container.
setHorizontalAlignment(horizontalAlignment: HorizontalAlignment)Sets the horizontal alignment of this paragraph within its container.
isInLineParagraph()booleanReturns whether this paragraph is an inline element.
setInLineParagraph(inLineParagraph: boolean)Sets whether this paragraph should be treated as an inline element.
isKeptWithNext()booleanReturns 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()booleanReturns whether this paragraph is the first in its column.
setFirstParagraphInColumn(firstParagraphInColumn: boolean)Sets whether this paragraph is the first in its column.
isInNewPage()booleanReturns 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()HyperlinkReturns 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.

See Also