HelpBot Assistant

How can I help you?

PdfListItem

6 Feb 20264 minutes 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, {x: 0, y: 20});
// Save the document
document.save('output.pdf');
// Destroy the document
document.destroy();

Properties

Get brush PdfBrush

Gets the brush associated with the list item.

Set brush void

Sets the brush associated with the list item.

Parameter Type Description
value PdfBrush The brush to specify the fill color of the list item.

Get font PdfFont

Get the PdfFont object associated with the list item.

Set font void

Sets the PdfFont object associated with the list item.

Parameter Type Description
value PdfFont The PdfFont object to be set for text rendering.

Get pen PdfPen

Gets the PdfPen object associated with the list item.

Set pen void

Sets the Pdfpen object associated with the list item.

Parameter Type Description
value PdfPen PdfPen object used to specify stroke properties.

Get stringFormat PdfStringFormat

Gets the PdfStringFormat object associated with the list item.

Set stringFormat void

Sets the PdfStringFormat object associated with the list item.

Parameter Type Description
value PdfStringFormat ThePdfStringFormat object to be set for text formatting.

Get subList PdfList

Get the sub-list associated with the current list item.

Set subList void

Sets the sub-list associated with the current list item.

Parameter Type Description
value PdfList The PdfList object to be set as the sub-list.

Get text string

Gets the text content of the list item.

Set text void

Sets string format of the list item.

Parameter Type Description
value string The text content to be set.

Get textIndent number

Gets the text indent of the list.

Set textIndent void

Sets the text indent of the list item.

Parameter Type Description
value number He text indent value to be set.