HelpBot Assistant

How can I help you?

PdfOrderedList

6 Feb 20269 minutes to read

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

Get alignment PdfListMarkerAlignment

Gets the text alignment of the list.

Set alignment void

Sets the text alignment of the list.

Parameter Type Description
value PdfListMarkerAlignment The text alignment to set for the list.

Get brush PdfBrush

Gets the PdfBrush object associated with the list.

Set brush void

Sets the PdfBrush object associated with the list.

Parameter Type Description
value PdfBrush The PdfBrush object to specify fill text rendering mode.

Get delimiter string

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

Set delimiter void

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

Parameter Type Description
value string The delimiter string to be set.

Get enableHierarchy boolean

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

Set enableHierarchy void

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

Parameter Type Description
value boolean The boolean flag to enable or disable hierarchical structure.

Get font PdfFont

Gets the font of the list item.

Set font void

Sets the PdfFont object associated with the list.

Parameter Type Description
value PdfFont The PdfPen object to to set for the list items.

Get indent number

Gets the indent of the list.

Set indent void

Sets the indent of the list.

Parameter Type Description
value number The indent value to set for the list.

Get items PdfListItemCollection

Gets the item collection of the list.

Set items void

Sets the item collection of the list.

Parameter Type Description
value PdfListItemCollection The list item collection.

Get pen PdfPen

Gets the PdfPen object associated with the list.

Set pen void

Sets the PdfPen object associated with the list.

Parameter Type Description
value PdfPen The PdfPen object to specify fill text rendering mode.

Get startNumber number

Gets the starting number used for the ordered list.

Set startNumber void

Sets the starting number to be used for the ordered list.

Parameter Type Description
value number The starting number to set.

Get stringFormat PdfStringFormat

Gets the text layout format associated with the list item.

Set stringFormat void

Sets the text layout format of the list item.

Parameter Type Description
value PdfStringFormat The PdfStringFormat object that specifies the text layout information.

Get style PdfNumberStyle

Gets the numbering style used for the ordered list.

Set style void

Sets the numbering style used for the ordered list.

Parameter Type Description
value PdfNumberStyle The numbering style used for the ordered list.

Get textIndent number

Gets the text indent of the list.

Set textIndent void

Sets the text indent of the list.

Parameter Type Description
value number The text indent value to set for the list.

Methods

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.
location Point The (x, y) coordinates where the list will be drawn.

Returns void

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.
location Point The (x, Y) coordinates where the list will be drawn.

Returns PdfLayoutResult

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.
location Point The (x, y) coordinates 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.
bounds Rectangle The bounding rectangle where the list will be drawn.

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.
bounds Rectangle The bounding rectangle where the list will be drawn.
format PdfLayoutFormat The layout format options for drawing.

Returns PdfLayoutResult