Class: TableCell

Core.PDFNet. TableCell


new TableCell()

A class representing a table cell, which can be used during document creation.

Extends

Members


<static> AlignmentHorizontal

Properties:
Name Type Description
e_alignment_horz_invalid number
e_alignment_left number
e_alignment_middle number
e_alignment_right number

<static> AlignmentVertical

Properties:
Name Type Description
e_alignment_vert_invalid number
e_alignment_top number
e_alignment_center number
e_alignment_bottom number

Methods


addParagraph()

Add an empty paragraph to the cell
Returns:
A promise that resolves to the paragraph that was added
Type
Promise.<Core.PDFNet.Paragraph>

addParagraphWithText(text)

Add a paragraph with text to the cell
Parameters:
Name Type Description
text string
Returns:
A promise that resolves to the paragraph that was added
Type
Promise.<Core.PDFNet.Paragraph>

addTable()

Add a nested table to the cell
Returns:
A promise that resolves to the table that was added
Type
Promise.<Core.PDFNet.Table>

asContentNode()

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

asList()

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

asListItem()

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

asParagraph()

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

asTable()

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

asTableCell()

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

asTableRow()

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

asTextRun()

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

getBorderThickness()

Get the border thickness of the table cell
Returns:
A promise that resolves to border thickness
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.<Core.PDFNet.Iterator.<Core.PDFNet.ContentElement>>

getHeight()

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

getHorizontalAlignment()

Get the horizontal alignment of the cell
Returns:
A promise that resolves to the horizontal Alignment of the cell
Type
Promise.<number>
Example
Return value enum:
<pre>
PDFNet.TableCell.AlignmentHorizontal = {
	e_alignment_horz_invalid : 0
	e_alignment_left : 1
	e_alignment_middle : 2
	e_alignment_right : 3
}
</pre>

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.<Core.PDFNet.TextStyledElement>

getVerticalAlignment()

Get the vertical alignment of the cell
Returns:
A promise that resolves to the vertical alignment of the cell
Type
Promise.<number>
Example
Return value enum:
<pre>
PDFNet.TableCell.AlignmentVertical = {
	e_alignment_vert_invalid : 0
	e_alignment_top : 1
	e_alignment_center : 2
	e_alignment_bottom : 3
}
</pre>

getWidth()

Get the width of the cell
Returns:
A promise that resolves to the width of the cell
Type
Promise.<number>

mergeCellsDown(num)

Merge the cell with the specified number of cells downwards
Parameters:
Name Type Description
num number
Returns:
A promise that resolves to the merged cell
Type
Promise.<Core.PDFNet.TableCell>

mergeCellsRight(num)

Merge the cell with the specified number of cells to the right
Parameters:
Name Type Description
num number
Returns:
A promise that resolves to the merged cell
Type
Promise.<Core.PDFNet.TableCell>

setBackgroundColor(red, green, blue)

Set the background color of the cell
Parameters:
Name Type Description
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>

setBorder(thickness, red, green, blue)

Set the cell's border thickness and color
Parameters:
Name Type Description
thickness number The thickness of the border
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>

setHeight(val)

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

setHorizontalAlignment(val)

Set horizontal alignment of the cell
Parameters:
Name Type Description
val number
PDFNet.TableCell.AlignmentHorizontal = {
	e_alignment_horz_invalid : 0
	e_alignment_left : 1
	e_alignment_middle : 2
	e_alignment_right : 3
}
The horizontal alignment of the cell
Returns:
Type
Promise.<void>

setVerticalAlignment(val)

Set the vertical alignment of the cell
Parameters:
Name Type Description
val number
PDFNet.TableCell.AlignmentVertical = {
	e_alignment_vert_invalid : 0
	e_alignment_top : 1
	e_alignment_center : 2
	e_alignment_bottom : 3
}
The vertical alignment of the cell
Returns:
Type
Promise.<void>

setWidth(val)

Set the width of the cell
Parameters:
Name Type Description
val number The width of the cell
Returns:
Type
Promise.<void>