/ PDF / PdfOrderedList
Search results

PdfOrderedList API in JavaScript PDF API control

Represents an ordered list in a PDF document.

// Load an existing document
let document: PdfDocument = new PdfDocument(data);
// Access the first page
let page: PdfPage = document.getPage(0);
// Define an array of strings representing items to be added
let products: string[] = ['Excel', 'Power', 'Point', 'Word', 'PDF'];
// Add the items to list item collection by passing the array of products
let items: PdfListItemCollection = new PdfListItemCollection(products);
// Create an instance of ordered list
let list: PdfOrderedList = new PdfOrderedList(items);
// Draw the ordered 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.

startNumber number

Gets the starting number used for the ordered list.

stringFormat PdfStringFormat

Gets the text layout format associated with the list item.

style PdfNumberStyle

Gets the numbering style used for the ordered 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