new TableCell()
A class representing a table cell, which can be used during document creation.
Extends
Members
-
<static> AlignmentHorizontal
-
Type:
- number
Properties:
Name Type Description e_alignment_horz_invalidnumber e_alignment_leftnumber e_alignment_middlenumber e_alignment_rightnumber -
<static> AlignmentVertical
-
Type:
- number
Properties:
Name Type Description e_alignment_vert_invalidnumber e_alignment_topnumber e_alignment_centernumber e_alignment_bottomnumber
Methods
-
addParagraph()
-
Add an empty paragraph to the cell
Returns:
A promise that resolves to the paragraph that was added- Type
- Promise.<PDFNet.Paragraph>
-
addParagraphWithText(text)
-
Add a paragraph with text to the cell
Parameters:
Name Type Description textstring Returns:
A promise that resolves to the paragraph that was added- Type
- Promise.<PDFNet.Paragraph>
-
addTable()
-
Add a nested table to the cell
Returns:
A promise that resolves to the table that was added- Type
- Promise.<PDFNet.Table>
-
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 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.<PDFNet.Iterator.<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.<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 numnumber Returns:
A promise that resolves to the merged cell- Type
- Promise.<PDFNet.TableCell>
-
mergeCellsRight(num)
-
Merge the cell with the specified number of cells to the right
Parameters:
Name Type Description numnumber Returns:
A promise that resolves to the merged cell- Type
- Promise.<PDFNet.TableCell>
-
setBackgroundColor(red, green, blue)
-
Set the background color of the cell
Parameters:
Name Type Description rednumber The red component of the border color greennumber The green component of the border color bluenumber 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 thicknessnumber The thickness of the border rednumber The red component of the border color greennumber The green component of the border color bluenumber The blue component of the border color Returns:
- Type
- Promise.<void>
-
setHeight(val)
-
Set the height of the cell
Parameters:
Name Type Description valnumber The height of the cell Returns:
- Type
- Promise.<void>
-
setHorizontalAlignment(val)
-
Set horizontal alignment of the cell
Parameters:
Name Type Description valnumber 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 cellReturns:
- Type
- Promise.<void>
-
setVerticalAlignment(val)
-
Set the vertical alignment of the cell
Parameters:
Name Type Description valnumber 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 cellReturns:
- Type
- Promise.<void>
-
setWidth(val)
-
Set the width of the cell
Parameters:
Name Type Description valnumber The width of the cell Returns:
- Type
- Promise.<void>