PdfListItem
12 Sep 20251 minute to read
Represents the items of the list.
// Load an existing PDF document
let document: PdfDocument = new PdfDocument(data);
// Access the first page
let page: PdfPage = document.getPage(0);
// Create an instance of list item collection by passing the string array
let items: PdfListItemCollection = new PdfListItemCollection(['Excel', 'Power', 'Point', 'Word']);
// Create a new list item and add into the collection
items.add(new PdfListItem('PDF'));
// Create a new PDF ordered list
let list: PdfOrderedList = new PdfOrderedList(items);
// Draw the list items
list.draw(page, 0, 20);
// Save the document
document.save('output.pdf');
// Destroy the document
document.destroy();Properties
brush PdfBrush
Gets the brush associated with the list item.
font PdfFont
Get the PdfFont object associated with the list item.
pen PdfPen
Gets the PdfPen object associated with the list item.
stringFormat PdfStringFormat
Gets the PdfStringFormat object associated with the list item.
subList PdfList
Get the sub-list associated with the current list item.
text string
Gets the text content of the list item.
textIndent number
Gets the text indent of the list.