Represents base class for lists.
// Load an existing PDF document
let document: PdfDocument = new PdfDocument(data);
// Access the first page
let page: PdfPage = document.getPage(0);
// Assign the array of string items
let products: string[] = ['Excel', 'Power', 'Point', 'Word', 'PDF'];
// Initialize a new brush
let brush: PdfBrush = new PdfBrush([0, 255, 255])
// Add an item to item collection by passing the string array
let items: PdfListItemCollection = new PdfListItemCollection(products);
// Create a new instance of ordered list
let list: PdfList = new PdfOrderedList(items);
// Draw the ordered list with specified items
list.draw(page, 0, 20, 500, 700);
// Get the brush associated with the ordered list
let listBrush: PdfBrush = list.brush;
// Save the document
document.save('output.pdf');
// Destroy the document
document.destroy();
PdfListMarkerAlignment
Gets the text alignment of the list.
PdfBrush
Gets the PdfBrush
object associated with the list.
string
Gets the delimiter string used to separate items in the list.
boolean
Gets a value indicating whether hierarchical structure is enabled for the list.
PdfFont
Gets the font of the list item.
number
Gets the indent of the list.
PdfListItemCollection
Gets the item collection of the list.
PdfPen
Gets the PdfPen
object associated with the list.
PdfStringFormat
Gets the text layout format associated with the list item.
number
Gets the text indent of the list.
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
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
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
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
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