Class: TextStyledElement

PDFNet. TextStyledElement


new TextStyledElement()

A TextStyledElement provides access to the text style properties of a ContentElement.

Extends

Methods


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>

getFontFace()

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

getFontSize()

Get the font size of the style
Returns:
A promise that resolves to the font size of the 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.<PDFNet.TextStyledElement>

isBold()

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

isItalic()

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

setBackgroundColor(red, green, blue)

Set the background color for the style
Parameters:
Name Type Description
red number The red component of the text color
green number The green component of the text color
blue number The blue component of the text color
Returns:
Type
Promise.<void>

setBold(val)

Set or unset the style as 'Bold'
Parameters:
Name Type Description
val boolean use true to set the style as 'Bold'
Returns:
Type
Promise.<void>

setFontFace(font_name)

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

setFontSize(font_size)

Set font size of the style
Parameters:
Name Type Description
font_size number The font size to use for the style
Returns:
Type
Promise.<void>

setItalic(val)

Set or unset the style as 'italic'
Parameters:
Name Type Description
val boolean use true to set the style as 'Italic'
Returns:
Type
Promise.<void>

setTextColor(red, green, blue)

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