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.<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.<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.<PDFNet.Paragraph>
-
asContentElement()
-
Returns:
A promise that resolves to an object of type: "PDFNet.ContentElement"- Type
- Promise.<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.<PDFNet.Iterator.<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.<PDFNet.TextStyledElement>