Skip to main content

UnorderedList

Version: 8.0

cete.dynamicpdf.pageelements.unorderedlist

UnorderedList​

Represents the unordered list.

public class UnorderedList : List, IArea, ICoordinate, ISerializable
Public Class UnorderedList
Inherits List
Implements IArea, ICoordinate, ISerializable

Inheritance: Object → PageElement → TaggablePageElement → RotatingPageElement → List → UnorderedList

Implements: IArea, ICoordinate, ISerializable

Licensing​

This class is a DynamicPDF Generator Professional Edition feature. One of the following licenses is required for non-evaluation usage:

  • DynamicPDF Generator for .NET Professional Edition
  • DynamicPDF Generator for .NET Enterprise Edition
  • DynamicPDF Merger for .NET Professional Edition
  • DynamicPDF Merger for .NET Enterprise Edition
  • DynamicPDF ReportWriter for .NET Professional Edition
  • DynamicPDF ReportWriter for .NET Enterprise Edition
  • DynamicPDF Core Suite for .NET Professional Edition
  • DynamicPDF Core Suite for .NET Enterprise Edition

Examples​

The following example shows a UnorderedList text being displayed on the page.

Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements

Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document

' Create a Page
Dim MyPage As Page = New Page

' Create a OrderedList.
Dim list As UnorderedList = New UnorderedList(50, 50, 300, 500)

list.ListItemTopMargin = 5
list.ListItemBottomMargin = 5
list.TextColor = RgbColor.BlueViolet

' Add ListItem to the List.
Dim item1 As ListItem = list.Items.Add("List item 1")
item1.Underline = True
Dim item2 As ListItem = list.Items.Add("List item 2")
item2.Underline = True
Dim item3 As ListItem = list.Items.Add("List item 3")
item3.Underline = True
Dim item4 As ListItem = list.Items.Add("List item 4")
item4.Underline = True

' Add OrderedSubList under ListItem item1
Dim subList1 As UnorderedSubList = item1.SubLists.AddUnorderedSubList(UnorderedListStyle.Circle)
subList1.TextColor = RgbColor.HotPink
Dim item5 As ListItem = subList1.Items.Add("Sub-list item 1")
Dim item6 As ListItem = subList1.Items.Add("Sub-list item 2")

Dim subList2 As UnorderedSubList = item2.SubLists.AddUnorderedSubList(UnorderedListStyle.Square)
subList2.TextColor = RgbColor.DarkGoldenRod
Dim item7 As ListItem = subList2.Items.Add("Second level sub-list item 1")
Dim item8 As ListItem = subList2.Items.Add("Second level sub-list item 2")

Dim subList3 As UnorderedSubList = item3.SubLists.AddUnorderedSubList(UnorderedListStyle.Square)
subList3.TextColor = RgbColor.DarkGoldenRod
Dim item9 As ListItem = subList3.Items.Add("Second level sub-list item 1")
Dim item10 As ListItem = subList3.Items.Add("Second level sub-list item 2")

Dim subList4 As UnorderedSubList = item6.SubLists.AddUnorderedSubList(UnorderedListStyle.Circle)
subList4.TextColor = RgbColor.HotPink
Dim item11 As ListItem = subList4.Items.Add("Sub-list item 1")
Dim item12 As ListItem = subList4.Items.Add("Sub-list item 2")

Dim subList5 As UnorderedSubList = item7.SubLists.AddUnorderedSubList(UnorderedListStyle.Square)
subList5.TextColor = RgbColor.DarkGoldenRod
Dim item13 As ListItem = subList5.Items.Add("Second level sub-list item 1")
Dim item14 As ListItem = subList5.Items.Add("Second level sub-list item 2")

Dim subList6 As UnorderedSubList = item4.SubLists.AddUnorderedSubList(UnorderedListStyle.Square)
subList6.TextColor = RgbColor.DarkGoldenRod
Dim item15 As ListItem = subList6.Items.Add("Second level sub-list item 1")
Dim item16 As ListItem = subList6.Items.Add("Second level sub-list item 2")

Dim subList7 As UnorderedSubList = item5.SubLists.AddUnorderedSubList(UnorderedListStyle.Circle)
subList7.TextColor = RgbColor.HotPink
Dim item17 As ListItem = subList7.Items.Add("Sub-list item 1")
Dim item18 As ListItem = subList7.Items.Add("Sub-list item 2")

' Add the OrderedList to the Page.
MyPage.Elements.Add(list)

'Add the Page to the Document.
MyDocument.Pages.Add(MyPage)

' Save the PDF.
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;

class MyClass
{
static void Main()
{
Document document = new Document();

// Create a Page.
Page page = new Page();

// Create a UnorderedList.
UnorderedList list = new UnorderedList(50, 50, 300, 500);

list.ListItemTopMargin = 5;
list.ListItemBottomMargin = 5;
list.TextColor = RgbColor.BlueViolet;

// Add ListItem to the List.
ListItem item1 = list.Items.Add("List item 1");
item1.Underline = true;
ListItem item2 = list.Items.Add("List item 2");
item2.Underline = true;
ListItem item3 = list.Items.Add("List item 3");
item3.Underline = true;
ListItem item4 = list.Items.Add("List item 4");
item4.Underline = true;

// Add UnorderedSubList under ListItem item1
UnorderedSubList subList1 = item1.SubLists.AddUnorderedSubList(UnorderedListStyle.Circle);
subList1.TextColor = RgbColor.HotPink;
ListItem item5 = subList1.Items.Add("Sub-list item 1");
ListItem item6 = subList1.Items.Add("Sub-list item 2");

UnorderedSubList subList2 = item5.SubLists.AddUnorderedSubList(UnorderedListStyle.Square);
subList2.TextColor = RgbColor.DarkGoldenRod;
ListItem item7 = subList2.Items.Add("Second level sub-list item 1");
ListItem item8 = subList2.Items.Add("Second level sub-list item 2");

UnorderedSubList subList3 = item6.SubLists.AddUnorderedSubList(UnorderedListStyle.Square);
subList3.TextColor = RgbColor.DarkGoldenRod;
ListItem item9 = subList3.Items.Add("Second level sub-list item 1");
ListItem item10 = subList3.Items.Add("Second level sub-list item 2");

UnorderedSubList subList4 = item2.SubLists.AddUnorderedSubList(UnorderedListStyle.Circle);
subList4.TextColor = RgbColor.HotPink;
ListItem item11 = subList4.Items.Add("Sub-list item 1");
ListItem item12 = subList4.Items.Add("Sub-list item 2");

UnorderedSubList subList5 = item11.SubLists.AddUnorderedSubList(UnorderedListStyle.Square);
subList5.TextColor = RgbColor.DarkGoldenRod;
ListItem item13 = subList5.Items.Add("Second level sub-list item 1");
ListItem item14 = subList5.Items.Add("Second level sub-list item 2");

UnorderedSubList subList6 = item12.SubLists.AddUnorderedSubList(UnorderedListStyle.Square);
subList6.TextColor = RgbColor.DarkGoldenRod;
ListItem item15 = subList6.Items.Add("Second level sub-list item 1");
ListItem item16 = subList6.Items.Add("Second level sub-list item 2");

UnorderedSubList subList7 = item3.SubLists.AddUnorderedSubList(UnorderedListStyle.Circle);
subList7.TextColor = RgbColor.HotPink;
ListItem item17 = subList7.Items.Add("Sub-list item 1");
ListItem item18 = subList7.Items.Add("Sub-list item 2");

// Add the UnorderedList to the page
page.Elements.Add(list);

// Add the Page to the Document.
document.Pages.Add(page);

// Save the PDF.
document.Draw(@"c:\MyDocument.pdf");
}
}

Remarks​

See the Lists topic for more on unordered lists.

NOTE: This page element cannot be used within a table cell, or transformation group.

Constructors​

UnorderedList(Single, Single, Single, Single)​

Creating new Instance of the UnorderedList.

public UnorderedList(float x, float y, float width, float height)
Public Sub New (x As Single, y As Single, width As Single, height As Single)

Parameters​

X coordinate of the UnorderedList.

Y coordinate of the UnorderedList.

Width of the UnorderedList.

Height of the UnorderedList.

UnorderedList(Single, Single, Single, Single, Font, Single)​

Creating new Instance of the UnorderedList.

public UnorderedList(float x, float y, float width, float height, Font font, float fontSize)
Public Sub New (x As Single, y As Single, width As Single, height As Single, font As Font, fontSize As Single)

Parameters​

X coordinate of the UnorderedList.

Y coordinate of the UnorderedList.

Width of the UnorderedList.

Height of the UnorderedList.

Font of the UnorderedList.

FontSize of the UnorderedList.

UnorderedList(Single, Single, Single, Single, Font, Single, UnorderedListStyle)​

Creating new Instance of the UnorderedList.

public UnorderedList(float x, float y, float width, float height, Font font, float fontSize, UnorderedListStyle bullet)
Public Sub New (x As Single, y As Single, width As Single, height As Single, font As Font, fontSize As Single, bullet As UnorderedListStyle)

Parameters​

X coordinate of the UnorderedList.

Y coordinate of the UnorderedList.

Width of the UnorderedList.

Height of the UnorderedList.

Font of the UnorderedList.

FontSize of the UnorderedList.

UnorderedListStyle of the UnorderedList.

Properties​

Angle​

Gets or sets the heights of the angle element. (Inherited from RotatingPageElement)

public float Angle { get; set; }
Public Property Angle As Single

Property Value​

Single

BulletAlign​

Gets or sets the Align enumeration that specifies the Bullet alignment of the List. (Inherited from List)

public Align BulletAlign { get; set; }
Public Property BulletAlign As Align

Property Value​

Align

BulletAreaWidth​

Gets or sets the Width in which bullets will be drawn, for each ListItem of the List. (Inherited from List)

public float BulletAreaWidth { get; set; }
Public Property BulletAreaWidth As Single

Property Value​

Single

BulletSize​

Gets or Sets the bullet's size for the List . (Inherited from List)

public float BulletSize { get; set; }
Public Property BulletSize As Single

Property Value​

Single

BulletStyle​

Gets or Sets the BulletStyle of the List.

public UnorderedListStyle BulletStyle { get; set; }
Public Property BulletStyle As UnorderedListStyle

Property Value​

UnorderedListStyle

Font​

Gets or sets the Font of the text for the List. (Inherited from List)

public Font Font { get; set; }
Public Property Font As Font

Property Value​

Font

FontSize​

Gets or Sets the Font size of the List. (Inherited from List)

public float FontSize { get; set; }
Public Property FontSize As Single

Property Value​

Single

Height​

Gets or sets the Height of the List. (Inherited from List)

public float Height { get; set; }
Public Property Height As Single

Property Value​

Single

ID​

Gets or sets the ID of the page element. (Inherited from PageElement)

public string ID { get; set; }
Public Property ID As String

Property Value​

String

Items​

Gets the ListItemLists of the List. (Inherited from List)

public ListItemList Items { get; }
Public Property Items As ListItemList

Property Value​

ListItemList

Leading​

Gets or Sets the leading for the text of the List. (Inherited from List)

public float Leading { get; set; }
Public Property Leading As Single

Property Value​

Single

LeftIndent​

Gets or Sets the LeftIndent of the whole List. Each ListItem may have his own LeftIndent. (Inherited from List)

public float LeftIndent { get; set; }
Public Property LeftIndent As Single

Property Value​

Single

ListItemBottomMargin​

Gets or Sets the BottomMargin of the ListItems in the List. (Inherited from List)

public float ListItemBottomMargin { get; set; }
Public Property ListItemBottomMargin As Single

Property Value​

Single

ListItemTopMargin​

Gets or Sets the TopMargin of the ListItems in the List. (Inherited from List)

public float ListItemTopMargin { get; set; }
Public Property ListItemTopMargin As Single

Property Value​

Single

ParagraphIndent​

Gets or Sets the paragraphIndent of the List. (Inherited from List)

public float ParagraphIndent { get; set; }
Public Property ParagraphIndent As Single

Property Value​

Single

RightIndent​

Gets or Sets the RightIndent of the whole List. Each ListItem may have his own RightIndent. (Inherited from List)

public float RightIndent { get; set; }
Public Property RightIndent As Single

Property Value​

Single

RightToLeft​

Gets or Sets a value indicating if the Text is in RighttoLeft language. (Inherited from List)

public bool RightToLeft { get; set; }
Public Property RightToLeft As Boolean

Property Value​

Boolean

StrikeThrough​

Gets or Sets the text of each ListItem of the List as StrikeThrough. (Inherited from List)

public bool StrikeThrough { get; set; }
Public Property StrikeThrough As Boolean

Property Value​

Boolean

Tag​

Gets or sets the tag of the taggable element. (Inherited from List)

public Tag Tag { get; set; }
Public Property Tag As Tag

Property Value​

Tag

Licensing​

This property is a DynamicPDF Generator Enterprise Edition feature. One of the following licenses is required for non-evaluation usage:

  • DynamicPDF Generator for .NET Enterprise Edition
  • DynamicPDF Merger for .NET Enterprise Edition
  • DynamicPDF ReportWriter for .NET Enterprise Edition
  • DynamicPDF Core Suite for .NET Enterprise Edition

TagOrder​

Gets or sets the tag order of the taggable element. (Inherited from List)

public int TagOrder { get; set; }
Public Property TagOrder As Int32

Property Value​

Int32

TextAlign​

Gets or sets the TextAlign enumeration that specifies the text alignment of the List. (Inherited from List)

public TextAlign TextAlign { get; set; }
Public Property TextAlign As TextAlign

Property Value​

TextAlign

TextColor​

Gets or sets the Color of the Text for whole List. (Inherited from List)

public Color TextColor { get; set; }
Public Property TextColor As Color

Property Value​

Color

TextOutlineColor​

Gets or sets the Color of the text outline for whole List. (Inherited from List)

public Color TextOutlineColor { get; set; }
Public Property TextOutlineColor As Color

Property Value​

Color

Remarks​

Unordered list bullets do not have text outline.

TextOutlineWidth​

Gets or sets the line width to use for the text outline of the list. (Inherited from List)

public float TextOutlineWidth { get; set; }
Public Property TextOutlineWidth As Single

Property Value​

Single

Remarks​

Unordered list bullets do not have text outline.

Width​

Gets or sets the Width of the List. (Inherited from List)

public float Width { get; set; }
Public Property Width As Single

Property Value​

Single

X​

Gets or sets the X coordinate of the page element. (Inherited from RotatingPageElement)

public float X { get; set; }
Public Property X As Single

Property Value​

Single

Y​

Gets or sets the Y coordinate of the page element. (Inherited from RotatingPageElement)

public float Y { get; set; }
Public Property Y As Single

Property Value​

Single

Methods​

Draw(PageWriter)​

Draws the page element to the given PageWriter object. (Inherited from RotatingPageElement)

public void Draw(PageWriter writer)
Sub Draw(writer As PageWriter)

Parameters​

PageWriter object to receive the page element's output.

Equals(Object)​

Determines whether the specified Object is equal to the current Object . (Inherited from Object)

public bool Equals(Object obj)
Function Equals(obj As Object) As Boolean

Parameters​

The Object to compare with the current Object .

Returns​

true if the specified Object is equal to the current Object ; otherwise, false.

GetHashCode()​

Serves as a hash function for a particular type. (Inherited from Object)

public int GetHashCode()
Function GetHashCode() As Integer

Returns​

A hash code for the current Object .

GetOverFlowList()​

Gets a UnorderedList object containing the List Text.

public UnorderedList GetOverFlowList()
Function GetOverFlowList() As UnorderedList

Returns​

Returns a UnorderedList object.

Examples​

The following example shows you how to use the GetOverflowList object to allow text of variable length to flow onto new pages as needed.

Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements

Module MyModuleSub Main() ' Create a PDF Document
Dim MyDocument As Document = New Document

' Create a Page
Dim MyPage As Page = New Page

' Create a OrderedList.
Dim list As UnorderedList = New UnorderedList(50, 50, 300, 250)

list.ListItemTopMargin = 5
list.ListItemBottomMargin = 5
list.TextColor = RgbColor.BlueViolet

' Add ListItem to the List.
Dim item1 As ListItem = list.Items.Add("List item 1")
item1.Underline = True
Dim item2 As ListItem = list.Items.Add("List item 2")
item2.Underline = True
Dim item3 As ListItem = list.Items.Add("List item 3")
item3.Underline = True
Dim item4 As ListItem = list.Items.Add("List item 4")
item4.Underline = True

' Add OrderedSubList under ListItem item1
Dim subList1 As UnorderedSubList = item1.SubLists.AddUnorderedSubList(UnorderedListStyle.Circle)
subList1.TextColor = RgbColor.HotPink
Dim item5 As ListItem = subList1.Items.Add("Sub-list item 1")
Dim item6 As ListItem = subList1.Items.Add("Sub-list item 2")

Dim subList2 As UnorderedSubList = item2.SubLists.AddUnorderedSubList(UnorderedListStyle.Square)
subList2.TextColor = RgbColor.DarkGoldenRod
Dim item7 As ListItem = subList2.Items.Add("Second level sub-list item 1")
Dim item8 As ListItem = subList2.Items.Add("Second level sub-list item 2")

Dim subList3 As UnorderedSubList = item3.SubLists.AddUnorderedSubList(UnorderedListStyle.Square)
subList3.TextColor = RgbColor.DarkGoldenRod
Dim item9 As ListItem = subList3.Items.Add("Second level sub-list item 1")
Dim item10 As ListItem = subList3.Items.Add("Second level sub-list item 2")

Dim subList4 As UnorderedSubList = item6.SubLists.AddUnorderedSubList(UnorderedListStyle.Circle)
subList4.TextColor = RgbColor.HotPink
Dim item11 As ListItem = subList4.Items.Add("Sub-list item 1")
Dim item12 As ListItem = subList4.Items.Add("Sub-list item 2")

Dim subList5 As UnorderedSubList = item7.SubLists.AddUnorderedSubList(UnorderedListStyle.Square)
subList5.TextColor = RgbColor.DarkGoldenRod
Dim item13 As ListItem = subList5.Items.Add("Second level sub-list item 1")
Dim item14 As ListItem = subList5.Items.Add("Second level sub-list item 2")

Dim subList6 As UnorderedSubList = item4.SubLists.AddUnorderedSubList(UnorderedListStyle.Square)
subList6.TextColor = RgbColor.DarkGoldenRod
Dim item15 As ListItem = subList6.Items.Add("Second level sub-list item 1")
Dim item16 As ListItem = subList6.Items.Add("Second level sub-list item 2")

Dim subList7 As UnorderedSubList = item5.SubLists.AddUnorderedSubList(UnorderedListStyle.Circle)
subList7.TextColor = RgbColor.HotPink
Dim item17 As ListItem = subList7.Items.Add("Sub-list item 1")
Dim item18 As ListItem = subList7.Items.Add("Sub-list item 2")

'Add the OrderedList to the Page.
MyPage.Elements.Add(list)

'Add the Page to the Document.
MyDocument.Pages.Add(MyPage)

' Set the UnorderedList object equal to the rest of the text that did not fit
' if all the text did fit, GetOverflowList will return null
list = list.GetOverFlowList()

While Not list Is Nothing
MyPage = New Page(PageSize.A4)
MyPage.Elements.Add(list)
MyDocument.Pages.Add(MyPage)
list = list.GetOverFlowList()
End While

' Save the PDF.
MyDocument.Draw("C:\MyDocument.pdf")End sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;

class MyClass
{static void Main(){
Document document = new Document();

// Create a Page.
Page page = new Page();

// Create a OrderedList.
UnorderedList list = new UnorderedList(50, 50, 300, 250);

list.ListItemTopMargin = 5;
list.ListItemBottomMargin = 5;
list.TextColor = RgbColor.BlueViolet;

// Add ListItem to the List.
ListItem item1 = list.Items.Add("List item 1");
item1.Underline = true;
ListItem item2 = list.Items.Add("List item 2");
item2.Underline = true;
ListItem item3 = list.Items.Add("List item 3");
item3.Underline = true;
ListItem item4 = list.Items.Add("List item 4");
item4.Underline = true;

// Add UnorderedSubList under ListItem item1
UnorderedSubList subList1 = item1.SubLists.AddUnorderedSubList(UnorderedListStyle.Circle);
subList1.TextColor = RgbColor.HotPink;
ListItem item5 = subList1.Items.Add("Sub-list item 1");
ListItem item6 = subList1.Items.Add("Sub-list item 2");

UnorderedSubList subList2 = item5.SubLists.AddUnorderedSubList(UnorderedListStyle.Square);
subList2.TextColor = RgbColor.DarkGoldenRod;
ListItem item7 = subList2.Items.Add("Second level sub-list item 1");
ListItem item8 = subList2.Items.Add("Second level sub-list item 2");

UnorderedSubList subList3 = item6.SubLists.AddUnorderedSubList(UnorderedListStyle.Square);
subList3.TextColor = RgbColor.DarkGoldenRod;
ListItem item9 = subList3.Items.Add("Second level sub-list item 1");
ListItem item10 = subList3.Items.Add("Second level sub-list item 2");

UnorderedSubList subList4 = item2.SubLists.AddUnorderedSubList(UnorderedListStyle.Circle);
subList4.TextColor = RgbColor.HotPink;
ListItem item11 = subList4.Items.Add("Sub-list item 1");
ListItem item12 = subList4.Items.Add("Sub-list item 2");

UnorderedSubList subList5 = item11.SubLists.AddUnorderedSubList(UnorderedListStyle.Square);
subList5.TextColor = RgbColor.DarkGoldenRod;
ListItem item13 = subList5.Items.Add("Second level sub-list item 1");
ListItem item14 = subList5.Items.Add("Second level sub-list item 2");

UnorderedSubList subList6 = item12.SubLists.AddUnorderedSubList(UnorderedListStyle.Square);
subList6.TextColor = RgbColor.DarkGoldenRod;
ListItem item15 = subList6.Items.Add("Second level sub-list item 1");
ListItem item16 = subList6.Items.Add("Second level sub-list item 2");

UnorderedSubList subList7 = item3.SubLists.AddUnorderedSubList(UnorderedListStyle.Circle);
subList7.TextColor = RgbColor.HotPink;
ListItem item17 = subList7.Items.Add("Sub-list item 1");
ListItem item18 = subList7.Items.Add("Sub-list item 2");

// Add the UnorderedList to the page
page.Elements.Add(list);

// Add the Page to the Document.
document.Pages.Add(page);

// Set the UnorderedList object equal to the rest of the text that did not fit
// if all the text did fit, GetOverflowList will return null
list = list.GetOverFlowList();

while (list != null)
{
page = new Page(PageSize.A4);
page.Elements.Add(list);
document.Pages.Add(page);
list = list.GetOverFlowList();
}

//save the PDF.
document.Draw(@"c:\MyDocument.pdf");}
}

Remarks​

This method returns a new UnorderedList object that contains the remaining text that did not fit.

GetOverFlowList(Single, Single)​

Gets a UnorderedList object containing the List Text.

public UnorderedList GetOverFlowList(float x, float y)
Function GetOverFlowList(x As Single, y As Single) As UnorderedList

Parameters​

New X coordinate of the UnorderedList.

New Y coordinate of the UnorderedList.

Returns​

Returns a UnorderedList object.

Examples​

The following example shows you how to use the GetOverflowList object to allow text of variable length to flow onto new pages as needed.

Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements

Module MyModuleSub Main() ' Create a PDF Document
Dim MyDocument As Document = New Document

' Create a Page
Dim MyPage As Page = New Page

' Create a OrderedList.
Dim list As UnorderedList = New UnorderedList(50, 50, 300, 250)

list.ListItemTopMargin = 5
list.ListItemBottomMargin = 5
list.TextColor = RgbColor.BlueViolet

' Add ListItem to the List.
Dim item1 As ListItem = list.Items.Add("List item 1")
item1.Underline = True
Dim item2 As ListItem = list.Items.Add("List item 2")
item2.Underline = True
Dim item3 As ListItem = list.Items.Add("List item 3")
item3.Underline = True
Dim item4 As ListItem = list.Items.Add("List item 4")
item4.Underline = True

' Add OrderedSubList under ListItem item1
Dim subList1 As UnorderedSubList = item1.SubLists.AddUnorderedSubList(UnorderedListStyle.Circle)
subList1.TextColor = RgbColor.HotPink
Dim item5 As ListItem = subList1.Items.Add("Sub-list item 1")
Dim item6 As ListItem = subList1.Items.Add("Sub-list item 2")

Dim subList2 As UnorderedSubList = item2.SubLists.AddUnorderedSubList(UnorderedListStyle.Square)
subList2.TextColor = RgbColor.DarkGoldenRod
Dim item7 As ListItem = subList2.Items.Add("Second level sub-list item 1")
Dim item8 As ListItem = subList2.Items.Add("Second level sub-list item 2")

Dim subList3 As UnorderedSubList = item3.SubLists.AddUnorderedSubList(UnorderedListStyle.Square)
subList3.TextColor = RgbColor.DarkGoldenRod
Dim item9 As ListItem = subList3.Items.Add("Second level sub-list item 1")
Dim item10 As ListItem = subList3.Items.Add("Second level sub-list item 2")

Dim subList4 As UnorderedSubList = item6.SubLists.AddUnorderedSubList(UnorderedListStyle.Circle)
subList4.TextColor = RgbColor.HotPink
Dim item11 As ListItem = subList4.Items.Add("Sub-list item 1")
Dim item12 As ListItem = subList4.Items.Add("Sub-list item 2")

Dim subList5 As UnorderedSubList = item7.SubLists.AddUnorderedSubList(UnorderedListStyle.Square)
subList5.TextColor = RgbColor.DarkGoldenRod
Dim item13 As ListItem = subList5.Items.Add("Second level sub-list item 1")
Dim item14 As ListItem = subList5.Items.Add("Second level sub-list item 2")

Dim subList6 As UnorderedSubList = item4.SubLists.AddUnorderedSubList(UnorderedListStyle.Square)
subList6.TextColor = RgbColor.DarkGoldenRod
Dim item15 As ListItem = subList6.Items.Add("Second level sub-list item 1")
Dim item16 As ListItem = subList6.Items.Add("Second level sub-list item 2")

Dim subList7 As UnorderedSubList = item5.SubLists.AddUnorderedSubList(UnorderedListStyle.Circle)
subList7.TextColor = RgbColor.HotPink
Dim item17 As ListItem = subList7.Items.Add("Sub-list item 1")
Dim item18 As ListItem = subList7.Items.Add("Sub-list item 2")

'Add the OrderedList to the Page.
MyPage.Elements.Add(list)

'Add the Page to the Document.
MyDocument.Pages.Add(MyPage)

' Set the UnorderedList object equal to the rest of the text that did not fit
' if all the text did fit, GetOverflowList will return null
list = list.GetOverFlowList(50,50)

While Not list Is Nothing
MyPage = New Page(PageSize.A4)
MyPage.Elements.Add(list)
MyDocument.Pages.Add(MyPage)
list = list.GetOverFlowList(50,50)
End While

' Save the PDF.
MyDocument.Draw("C:\MyDocument.pdf")End sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;

class MyClass
{static void Main(){
Document document = new Document();

// Create a Page.
Page page = new Page();

// Create a OrderedList.
UnorderedList list = new UnorderedList(50, 50, 300, 250);

list.ListItemTopMargin = 5;
list.ListItemBottomMargin = 5;
list.TextColor = RgbColor.BlueViolet;

// Add ListItem to the List.
ListItem item1 = list.Items.Add("List item 1");
item1.Underline = true;
ListItem item2 = list.Items.Add("List item 2");
item2.Underline = true;
ListItem item3 = list.Items.Add("List item 3");
item3.Underline = true;
ListItem item4 = list.Items.Add("List item 4");
item4.Underline = true;

// Add UnorderedSubList under ListItem item1
UnorderedSubList subList1 = item1.SubLists.AddUnorderedSubList(UnorderedListStyle.Circle);
subList1.TextColor = RgbColor.HotPink;
ListItem item5 = subList1.Items.Add("Sub-list item 1");
ListItem item6 = subList1.Items.Add("Sub-list item 2");

UnorderedSubList subList2 = item5.SubLists.AddUnorderedSubList(UnorderedListStyle.Square);
subList2.TextColor = RgbColor.DarkGoldenRod;
ListItem item7 = subList2.Items.Add("Second level sub-list item 1");
ListItem item8 = subList2.Items.Add("Second level sub-list item 2");

UnorderedSubList subList3 = item6.SubLists.AddUnorderedSubList(UnorderedListStyle.Square);
subList3.TextColor = RgbColor.DarkGoldenRod;
ListItem item9 = subList3.Items.Add("Second level sub-list item 1");
ListItem item10 = subList3.Items.Add("Second level sub-list item 2");

UnorderedSubList subList4 = item2.SubLists.AddUnorderedSubList(UnorderedListStyle.Circle);
subList4.TextColor = RgbColor.HotPink;
ListItem item11 = subList4.Items.Add("Sub-list item 1");
ListItem item12 = subList4.Items.Add("Sub-list item 2");

UnorderedSubList subList5 = item11.SubLists.AddUnorderedSubList(UnorderedListStyle.Square);
subList5.TextColor = RgbColor.DarkGoldenRod;
ListItem item13 = subList5.Items.Add("Second level sub-list item 1");
ListItem item14 = subList5.Items.Add("Second level sub-list item 2");

UnorderedSubList subList6 = item12.SubLists.AddUnorderedSubList(UnorderedListStyle.Square);
subList6.TextColor = RgbColor.DarkGoldenRod;
ListItem item15 = subList6.Items.Add("Second level sub-list item 1");
ListItem item16 = subList6.Items.Add("Second level sub-list item 2");

UnorderedSubList subList7 = item3.SubLists.AddUnorderedSubList(UnorderedListStyle.Circle);
subList7.TextColor = RgbColor.HotPink;
ListItem item17 = subList7.Items.Add("Sub-list item 1");
ListItem item18 = subList7.Items.Add("Sub-list item 2");

// Add the UnorderedList to the page
page.Elements.Add(list);

// Add the Page to the Document.
document.Pages.Add(page);

// Set the UnorderedList object equal to the rest of the text that did not fit
// if all the text did fit, GetOverflowList will return null
list = list.GetOverFlowList(50,50);

while (list != null)
{
page = new Page(PageSize.A4);
page.Elements.Add(list);
document.Pages.Add(page);
list = list.GetOverFlowList(50,50);
}

//save the PDF.
document.Draw(@"c:\MyDocument.pdf");}
}

Remarks​

This method returns a new UnorderedList object that contains the remaining text that did not fit.

GetRequiredHeight()​

Gets the height required to fit all of the text supplied.

public float GetRequiredHeight()
Function GetRequiredHeight() As Single

Returns​

The float value indicating required height to display all text.

GetType()​

Gets the Type of the current instance. (Inherited from Object)

public Type GetType()
Function GetType() As Type

Returns​

The Type instance that represents the exact runtime type of the current instance.

ToString()​

Returns a String that represents the current Object . (Inherited from Object)

public string ToString()
Function ToString() As String

Returns​

A String that represents the current Object .

See Also​

ceTe.DynamicPDF.PageElements