Class: Paragraph

Core.PDFNet. Paragraph


new Paragraph()

[Missing documentation]

Methods


addText(text)

Parameters:
Name Type Description
text string
Returns:
Type
Promise.<void>

getFontFace()

Returns:
A promise that resolves to the font name used for the style
Type
Promise.<string>

getFontSize()

Returns:
A promise that resolves to the font size used for the style
Type
Promise.<number>

getJustificationMode()

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

getSpaceAfter()

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

getSpaceBefore()

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

isBold()

Returns:
A promise that resolves to true if the style set as 'Bold'
Type
Promise.<boolean>

isItalic()

Returns:
A promise that resolves to true if the style set as 'italic'
Type
Promise.<boolean>

setBold(val)

set the style set as 'Bold'
Parameters:
Name Type Description
val boolean the new value for 'Bold'
Returns:
Type
Promise.<void>

setFontFace(font_name)

set the font name to be used for the style
Parameters:
Name Type Description
font_name string the font name
Returns:
Type
Promise.<void>

setFontSize(font_size)

set font size used for the style
Parameters:
Name Type Description
font_size number the font size
Returns:
Type
Promise.<void>

setItalic(val)

set the style set as 'italic'
Parameters:
Name Type Description
val boolean the new value for 'italic'
Returns:
Type
Promise.<void>

setJustificationMode(val)

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

setSpaceAfter(val)

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

setSpaceBefore(val)

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

setTextColor(red, green, blue)

set text color for the style
Parameters:
Name Type Description
red number the red value of the color
green number the green value of the color
blue number the blue value of the color
Returns:
Type
Promise.<void>