Class: Table

PDFNet. Table


new Table()

A Table is a content node that contains a grid of cells.

Extends

Methods


addTableRow()

Add a new row to the table
Returns:
A promise that resolves to the newly created row
Type
Promise.<PDFNet.TableRow>

asContentNode()

Inherited From:
Returns:
A promise that resolves to an object of type: "PDFNet.ContentNode"
Type
Promise.<PDFNet.ContentNode>

asList()

Inherited From:
Returns:
A promise that resolves to an object of type: "PDFNet.List"
Type
Promise.<PDFNet.List>

asListItem()

Inherited From:
Returns:
A promise that resolves to an object of type: "PDFNet.ListItem"
Type
Promise.<PDFNet.ListItem>

asParagraph()

Inherited From:
Returns:
A promise that resolves to an object of type: "PDFNet.Paragraph"
Type
Promise.<PDFNet.Paragraph>

asTable()

Inherited From:
Returns:
A promise that resolves to an object of type: "PDFNet.Table"
Type
Promise.<PDFNet.Table>

asTableCell()

Inherited From:
Returns:
A promise that resolves to an object of type: "PDFNet.TableCell"
Type
Promise.<PDFNet.TableCell>

asTableRow()

Inherited From:
Returns:
A promise that resolves to an object of type: "PDFNet.TableRow"
Type
Promise.<PDFNet.TableRow>

asTextRun()

Inherited From:
Returns:
A promise that resolves to an object of type: "PDFNet.TextRun"
Type
Promise.<PDFNet.TextRun>

getBorderThickness()

Get the border thickness of the table
Returns:
A promise that resolves to border thickness in points
Type
Promise.<number>

getContentNodeIterator()

Retrieve a ContentElementIterator object from the content node

The ContentElementIterator object can be used to traverse the children of the content node.

Inherited From:
Returns:
A promise that resolves to the ContentElementIterator object
Type
Promise.<PDFNet.Iterator.<PDFNet.ContentElement>>

getDefaultRowHeight()

Get default row height of the table
Returns:
A promise that resolves to default row height of the table
Type
Promise.<number>

getNumColumns()

Get the number of rows in the table
Returns:
A promise that resolves to number of rows in the table
Type
Promise.<number>

getNumRows()

Get the number of rows in the table
Returns:
A promise that resolves to number of rows in the table
Type
Promise.<number>

getTableCell(column, row)

Get a cell from the table
Parameters:
Name Type Description
column number The column index of the cell to retrieve
row number The row index of the cell to retrieve
Returns:
A promise that resolves to the TableCell at the specified column and row
Type
Promise.<PDFNet.TableCell>

getTextStyledElement()

Retrieve the TextStyledElement object for manipulating the text style of this content element.
Inherited From:
Returns:
A promise that resolves to the TextStyledElement object
Type
Promise.<PDFNet.TextStyledElement>

setBorder(thickness, red, green, blue)

Set the cell's border thickness and color
Parameters:
Name Type Description
thickness number The thickness of the border in points
red number The red component of the border color
green number The green component of the border color
blue number The blue component of the border color
Returns:
Type
Promise.<void>

setDefaultColumnWidth(val)

Set default column weight of the table
Parameters:
Name Type Description
val number The default column weight
Returns:
Type
Promise.<void>

setDefaultRowHeight(val)

Set default row height of the table
Parameters:
Name Type Description
val number The default row height
Returns:
Type
Promise.<void>