Class: ListItem

Core.PDFNet. ListItem


new ListItem()

A class representing an item in a list in the document content tree.

Methods


addList()

Add a nested list to the list item.
Returns:
A promise that resolves to the List object representing the nested list.
Type
Promise.<Core.PDFNet.List>

addParagraph()

Add a new paragraph to the list item.
Returns:
A promise that resolves to the Paragraph object representing the newly added paragraph.
Type
Promise.<Core.PDFNet.Paragraph>

addParagraphWithText(text)

Add a new paragraph with the specified text to the list item.
Parameters:
Name Type Description
text string The text content of the paragraph.
Returns:
A promise that resolves to the Paragraph object representing the newly added paragraph.
Type
Promise.<Core.PDFNet.Paragraph>

asContentElement()

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

getContentNodeIterator()

Retrieve a ContentElementIterator object from the list item

The ContentElementIterator object can be used to traverse the children of the list item.

Returns:
A promise that resolves to the ContentElementIterator object
Type
Promise.<Core.PDFNet.Iterator.<Core.PDFNet.ContentElement>>

getIndentationLevel()

Get the indentation level of the list item.
Returns:
A promise that resolves to the indentation level.
Type
Promise.<number>

getItemIndex()

Get the index of the list item within the parent list.
Returns:
A promise that resolves to the index of the list item.
Type
Promise.<number>

getListIdentifier()

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

getTextStyledElement()

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