Class: Paragraph

Core.PDFNet. Paragraph


new Paragraph()

A Paragraph is a content node that contains a list of TextRun objects.

Extends

Members


<static> TextJustification

Properties:
Name Type Description
e_text_justification_invalid number
e_text_justify_left number
e_text_justify_right number
e_text_justify_center number

Methods


addTabStop(val)

Adds a tab stop to the paragraph style.
Parameters:
Name Type Description
val number The position of the tab stop to add.
Returns:
Type
Promise.<void>

addText(text)

Add another text run to the paragraph
Parameters:
Name Type Description
text string The text to add
Returns:
A promise that resolves to the newly created TextRun object
Type
Promise.<Core.PDFNet.TextRun>

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()

Gets the border thickness for the paragraph style.
Returns:
A promise that resolves to the border thickness for the paragraph style.
Type
Promise.<number>

getContentNodeIterator()

{Promise>} A promise that resolves to Retrieve a ContentNodeIterator object from the content node

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

Inherited From:
Returns:
The ContentNodeIterator object

getDefaultTabStop()

Gets the default tab stop position for the paragraph style.
Returns:
A promise that resolves to the default tab stop position for the paragraph style.
Type
Promise.<number>

getEndIndent()

Gets the end indent for the paragraph style.
Returns:
A promise that resolves to the end indent value for the paragraph style.
Type
Promise.<number>

getJustificationMode()

Get justification mode for the paragraph
Returns:
A promise that resolves to justification mode for paragraph style
Type
Promise.<number>
Example
Return value enum:
<pre>
PDFNet.Paragraph.TextJustification = {
	e_text_justification_invalid : 0
	e_text_justify_left : 1
	e_text_justify_right : 2
	e_text_justify_center : 3
}
</pre>

getNextTabStop(val)

Gets the next tab stop position for the paragraph style, given a starting position.
Parameters:
Name Type Description
val number The starting position.
Returns:
A promise that resolves to the position of the next tab stop.
Type
Promise.<number>

getSpaceAfter()

Get the "space after" value for the paragraph style
Returns:
A promise that resolves to "space after" value for paragraph style
Type
Promise.<number>

getSpaceBefore()

Get the "space before" value for the paragraph style
Returns:
A promise that resolves to "space before" value for paragraph style
Type
Promise.<number>

getSpacesPerTab()

Gets the number of spaces per tab for the paragraph style.
Returns:
A promise that resolves to the number of spaces per tab for the paragraph style.
Type
Promise.<number>

getStartIndent()

Gets the start indent for the paragraph style.
Returns:
A promise that resolves to the start indent value for the paragraph style.
Type
Promise.<number>

getTextIndent()

Gets the text indent for the paragraph style.
Returns:
A promise that resolves to the text indent value for the paragraph style.
Type
Promise.<number>

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>

isDisplayRtl()

Checks if the paragraph style has the right-to-left (RTL) property set.
Returns:
A promise that resolves to true if the display is RTL, false otherwise.
Type
Promise.<boolean>

setBorder(thickness, red, green, blue)

Sets the border for the paragraph style.
Parameters:
Name Type Description
thickness number The border thickness.
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>

setDefaultTabStop(val)

Sets the default tab stop position for the paragraph style.
Parameters:
Name Type Description
val number The default tab stop position to set.
Returns:
Type
Promise.<void>

setDisplayRtl(val)

Sets the right-to-left (RTL) property for the paragraph style.
Parameters:
Name Type Description
val boolean The value to set. True if RTL, false if not.
Returns:
Type
Promise.<void>

setEndIndent(val)

Sets the end indent for the paragraph style.
Parameters:
Name Type Description
val number The end indent value to set.
Returns:
Type
Promise.<void>

setJustificationMode(val)

Set justification mode for paragraph style
Parameters:
Name Type Description
val number
PDFNet.Paragraph.TextJustification = {
	e_text_justification_invalid : 0
	e_text_justify_left : 1
	e_text_justify_right : 2
	e_text_justify_center : 3
}
The justification mode to set
Returns:
Type
Promise.<void>

setSpaceAfter(val)

Set the "space after" value for paragraph style
Parameters:
Name Type Description
val number The "space after" value to set
Returns:
Type
Promise.<void>

setSpaceBefore(val)

Set the "space before" value for the paragraph style
Parameters:
Name Type Description
val number The "space before" value to set
Returns:
Type
Promise.<void>

setSpacesPerTab(val)

Sets the number of spaces per tab for the paragraph style.
Parameters:
Name Type Description
val number The number of spaces per tab to set.
Returns:
Type
Promise.<void>

setStartIndent(val)

Sets the start indent for the paragraph style.
Parameters:
Name Type Description
val number The start indent value to set.
Returns:
Type
Promise.<void>

setTextIndent(val)

Sets the text indent for the paragraph style.
Parameters:
Name Type Description
val number The text indent value to set.
Returns:
Type
Promise.<void>