/ PDF / PdfUnorderedList
Search results

PdfUnorderedList API in JavaScript PDF API control

Represents the Unordered lists.

// Load an existing PDF document
let document: PdfDocument = new PdfDocument(data);
// Access the first page
let page: PdfPage = document.getPage(0);
// Define the items in the unordered list
let products: string[] = ['Excel', 'Power', 'Point', 'Word', 'PDF'];
// Create an instance of PdfListItemCollection by passing the string array
let items: PdfListItemCollection = new PdfListItemCollection(products);
// Create an instance of PdfUnorderedList
let list: PdfUnorderedList = new PdfUnorderedList();
// Draw the unordered list on the page
list.draw(page, 0, 20, layout);
// Save the document
document.save('output.pdf');
// Destroy the document
document.destroy();

Properties

alignment PdfListMarkerAlignment

Gets the text alignment of the list.

brush PdfBrush

Gets the PdfBrush object associated with the list.

delimiter string

Gets the delimiter string used to separate items in the list.

enableHierarchy boolean

Gets a value indicating whether hierarchical structure is enabled for the list.

font PdfFont

Gets the font of the list item.

indent number

Gets the indent of the list.

items PdfListItemCollection

Gets the item collection of the list.

pen PdfPen

Gets the PdfPen object associated with the list.

stringFormat PdfStringFormat

Gets the text layout format associated with the list item.

style PdfUnorderedListStyle

Gets the style used for the unordered list.

textIndent number

Gets the text indent of the list.

Methods

draw

Draws the content on the specified PdfPage at the given coordinates.

Parameter Type Description
page PdfPage The PDF page on which to draw the content.
x number The x-coordinate where the list will be drawn.
y number The y-coordinate where the list will be drawn.

Returns PdfLayoutResult

draw

Draws the PdfList at the specified coordinates on the PdfGraphics context.

Parameter Type Description
graphics PdfGraphics The graphics context on which to draw the list.
x number The x-coordinate where the list will be drawn.
y number The y-coordinate where the list will be drawn.

Returns void

draw

Draws the content on the specified PdfPage at the given coordinates with the specified layout format.

Parameter Type Description
page PdfPage The PDF page on which to draw the content.
x number The x-coordinate where the list will be drawn.
y number The y-coordinate where the list will be drawn.
format PdfLayoutFormat The layout format options for drawing.

Returns PdfLayoutResult

draw

Draws the content on the specified PdfPage within the specified bounds.

Parameter Type Description
page PdfPage The PDF page on which to draw the content.
x number The x-coordinate where the list will be drawn.
y number The y-coordinate where the list will be drawn.
width number The width of the area to draw within.
height number The height of the area to draw within.

Returns PdfLayoutResult

draw

Draws the content on the specified PdfPage at the given bounds with the specified layout format.

Parameter Type Description
page PdfPage The PDF page on which to draw the content.
x number The x-coordinate where the list will be drawn.
y number The y-coordinate where the list will be drawn.
width number The width of the area to draw within.
height number The height of the area to draw within.
format PdfLayoutFormat The layout format options for drawing.

Returns PdfLayoutResult