How can I help you?
PdfUnorderedList
6 Feb 20269 minutes to read
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, {x: 0, y: 20, width: 500, height: 700});
// 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 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 PdfUnorderedListStyle
Gets the style used for the unordered list.
Set style void
Sets the style used for the unordered list.
| Parameter | Type | Description |
|---|---|---|
| value | PdfUnorderedListStyle |
The style to set for the unordered 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