Skip to main content

OrderedList

Version: 6.0

cete.dynamicpdf.pageelements.orderedlist

OrderedList​

Represents an ordered list.

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

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

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 OrderedList text being displayed on the page.

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 and add it to the document Dim MyPage As Page = New Page MyDocument.Pages.Add(MyPage)
' Create an OrderedList. Dim list As OrderedList = New OrderedList(50,120,300,500)
list.ListItemTopMargin = 5 list.ListItemBottomMargin = 5 list.BulletPrefix = "(" list.BulletSuffix = ")" list.TextColor = RgbColor.HotPink Dim label1 As Label = New Label("CeTe Software specializes in components for dynamic PDF generation and manipulation. The DynamicPDF product line allows you to dynamically generate PDF documents, merge PDF documents and add new content to existing PDF documents from within your applications.",50,50,400,200) label1.Align = TextAlign.Justify
' Add ListItem to the List. Dim item1 As ListItem = list.Items.Add(".NET products") item1.Underline = true Dim item2 As ListItem = list.Items.Add("JAVA products") item2.Underline = true Dim item3 As ListItem = list.Items.Add("COM products") item3.Underline = true
' Add OrderedSubList under ListItem item1. Dim subList1 As OrderedSubList = item1.SubLists.AddOrderedSubList(NumberingStyle.RomanUpperCase) subList1.TextColor = RgbColor.DarkGoldenRod Dim item4 As ListItem = subList1.Items.Add("DynamicPDF Generator for .NET") Dim item5 As ListItem = subList1.Items.Add("DynamicPDF Merger for .NET")
Dim subList2 As OrderedSubList = item2.SubLists.AddOrderedSubList(NumberingStyle.RomanUpperCase) subList2.TextColor = RgbColor.DarkGoldenRod Dim item6 As ListItem = subList2.Items.Add("DynamicPDF Generator for JAVA") Dim item7 As ListItem = subList2.Items.Add("DynamicPDF Merger for JAVA")
Dim subList3 As OrderedSubList = item3.SubLists.AddOrderedSubList(NumberingStyle.RomanUpperCase) subList3.TextColor = RgbColor.DarkGoldenRod Dim item8 As ListItem = subList3.Items.Add("DynamicPDF Generator") Dim item9 As ListItem = subList3.Items.Add("DynamicPDF ReportWriter")
Dim subList4 As OrderedSubList = item6.SubLists.AddOrderedSubList(NumberingStyle.AlphabeticLowerCase) subList4.TextColor = RgbColor.BlueViolet Dim item10 As ListItem = subList4.Items.Add("Community Edition") Dim item11 As ListItem = subList4.Items.Add("Developer Edition") Dim item12 As ListItem = subList4.Items.Add("Server Edition")
Dim subList5 As OrderedSubList = item7.SubLists.AddOrderedSubList(NumberingStyle.AlphabeticLowerCase) subList5.TextColor = RgbColor.BlueViolet Dim item13 As ListItem = subList5.Items.Add("Evaluation Edition") Dim item14 As ListItem = subList5.Items.Add("Developer Edition") Dim item15 As ListItem = subList5.Items.Add("Server Edition")
Dim subList6 As OrderedSubList = item4.SubLists.AddOrderedSubList(NumberingStyle.AlphabeticLowerCase) subList6.TextColor = RgbColor.BlueViolet Dim item16 As ListItem = subList6.Items.Add("Community Edition") Dim item17 As ListItem = subList6.Items.Add("Professional Edition") Dim item18 As ListItem = subList6.Items.Add("Enterprise Edition")
Dim subList7 As OrderedSubList = item5.SubLists.AddOrderedSubList(NumberingStyle.AlphabeticLowerCase) subList7.TextColor = RgbColor.BlueViolet Dim item19 As ListItem = subList7.Items.Add("Standard Edition") Dim item20 As ListItem = subList7.Items.Add("Professional Edition") Dim item21 As ListItem = subList7.Items.Add("Enterprise Edition")
'Add the OrderedList to the page MyPage.Elements.Add(list) MyPage.Elements.Add(label1)
' 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(){ // Create a PDF Document. Document doc = new Document();
// Create a Page. Page page1 = new Page();
// Create a OrderedList. OrderedList list = new OrderedList(50,120,300,500);
list.ListItemTopMargin = 5; list.ListItemBottomMargin = 5; list.BulletPrefix = "("; list.BulletSuffix = ")"; list.TextColor = RgbColor.HotPink; Label label1 = new Label("CeTe Software specializes in components for dynamic PDF generation and manipulation. The DynamicPDF product line allows you to dynamically generate PDF documents, merge PDF documents and add new content to existing PDF documents from within your applications.",50,50,400,200); label1.Align = TextAlign.Justify;
// Add ListItem to the List. ListItem item1 = list.Items.Add(".NET products"); item1.Underline = true; ListItem item2 = list.Items.Add("JAVA products"); item2.Underline = true; ListItem item3 = list.Items.Add("COM products"); item3.Underline = true;
// Add OrderedSubList under ListItem item1 OrderedSubList subList1 = item1.SubLists.AddOrderedSubList(NumberingStyle.RomanUpperCase); subList1.TextColor = RgbColor.DarkGoldenRod; ListItem item4 = subList1.Items.Add("DynamicPDF Generator for .NET"); ListItem item5 = subList1.Items.Add("DynamicPDF Merger for .NET");
OrderedSubList subList2 = item2.SubLists.AddOrderedSubList(NumberingStyle.RomanUpperCase); subList2.TextColor = RgbColor.DarkGoldenRod; ListItem item6 = subList2.Items.Add("DynamicPDF Generator for JAVA"); ListItem item7 = subList2.Items.Add("DynamicPDF Merger for JAVA");
OrderedSubList subList3 = item3.SubLists.AddOrderedSubList(NumberingStyle.RomanUpperCase); subList3.TextColor = RgbColor.DarkGoldenRod; ListItem item8 = subList3.Items.Add("DynamicPDF Generator"); ListItem item9 = subList3.Items.Add("DynamicPDF ReportWriter");
OrderedSubList subList4 = item6.SubLists.AddOrderedSubList(NumberingStyle.AlphabeticLowerCase); subList4.TextColor = RgbColor.BlueViolet; ListItem item10 = subList4.Items.Add("Community Edition"); ListItem item11 = subList4.Items.Add("Developer Edition"); ListItem item12 = subList4.Items.Add("Server Edition");
OrderedSubList subList5 = item7.SubLists.AddOrderedSubList(NumberingStyle.AlphabeticLowerCase); subList5.TextColor = RgbColor.BlueViolet; ListItem item13 = subList5.Items.Add("Evaluation Edition"); ListItem item14 = subList5.Items.Add("Developer Edition"); ListItem item15 = subList5.Items.Add("Server Edition");
OrderedSubList subList6 = item4.SubLists.AddOrderedSubList(NumberingStyle.AlphabeticLowerCase); subList6.TextColor = RgbColor.BlueViolet; ListItem item16 = subList6.Items.Add("Community Edition"); ListItem item17 = subList6.Items.Add("Professional Edition"); ListItem item18 = subList6.Items.Add("Enterprise Edition");
OrderedSubList subList7 = item5.SubLists.AddOrderedSubList(NumberingStyle.AlphabeticLowerCase); subList7.TextColor = RgbColor.BlueViolet; ListItem item19 = subList7.Items.Add("Standard Edition"); ListItem item20 = subList7.Items.Add("Professional Edition"); ListItem item21 = subList7.Items.Add("Enterprise Edition");
// Add the OrderedList to the page page1.Elements.Add(list); page1.Elements.Add(label1);
// Add the Page to the Document. doc.Pages.Add(page1);
// Save the PDF doc.Draw(@"C:\MyDocument.pdf");}
}

Remarks​

See the Lists topic for more on ordered lists.

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

Constructors​

OrderedList(Single, Single, Single, Single)​

Creating new Instance of the OrderedList.

public OrderedList(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 OrderedList.

Y coordinate of the OrderedList.

Width of the OrderedList.

Height of the OrderedList.

OrderedList(Single, Single, Single, Single, Font, Single)​

Creating new Instance of the OrderedList.

public OrderedList(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 OrderedList.

Y coordinate of the OrderedList.

Width of the OrderedList.

Height of the OrderedList.

Font of the OrderedList.

FontSize of the OrderedList.

OrderedList(Single, Single, Single, Single, Font, Single, NumberingStyle)​

Creating new Instance of the OrderedList.

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

Parameters​

X coordinate of the OrderedList.

Y coordinate of the OrderedList.

Width of the OrderedList.

Height of the OrderedList.

Font of the OrderedList.

FontSize of the OrderedList.

NumberingStyle of the OrderedList.

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

BulletPrefix​

Sets or Gets the Prefix String of the Bullets.

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

Property Value​

String

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

BulletSuffix​

Sets or Gets the suffix String of the Bullets.

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

Property Value​

String

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 Fontsize 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

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 OrderedList object containing the List Text.

public OrderedList GetOverFlowList()
Function GetOverFlowList() As OrderedList

Returns​

Returns a OrderedList 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 and add it to the document Dim MyPage As Page = New Page MyDocument.Pages.Add(MyPage)
' Create a OrderedList. Dim list As OrderedList = New OrderedList(50,120,300,210)
list.ListItemTopMargin = 5 list.ListItemBottomMargin = 5 list.BulletPrefix = "(" list.BulletSuffix = ")" list.TextColor = RgbColor.HotPink Dim label1 As Label = New Label("CeTe Software specializes in components for dynamic PDF generation and manipulation. The DynamicPDF product line allows you to dynamically generate PDF documents, merge PDF documents and add new content to existing PDF documents from within your applications.",50,50,400,200) label1.Align = TextAlign.Justify
' Add ListItem to the List. Dim item1 As ListItem = list.Items.Add(".NET products") item1.Underline = true Dim item2 As ListItem = list.Items.Add("JAVA products") item2.Underline = true Dim item3 As ListItem = list.Items.Add("COM products") item3.Underline = true
' Add OrderedSubList under ListItem item1 Dim subList1 As OrderedSubList = item1.SubLists.AddOrderedSubList(NumberingStyle.RomanUpperCase) subList1.TextColor = RgbColor.DarkGoldenRod Dim item4 As ListItem = subList1.Items.Add("DynamicPDF Generator for .NET") Dim item5 As ListItem = subList1.Items.Add("DynamicPDF Merger for .NET")
Dim subList2 As OrderedSubList = item2.SubLists.AddOrderedSubList(NumberingStyle.RomanUpperCase) subList2.TextColor = RgbColor.DarkGoldenRod Dim item6 As ListItem = subList2.Items.Add("DynamicPDF Generator for JAVA") Dim item7 As ListItem = subList2.Items.Add("DynamicPDF Merger for JAVA")
Dim subList3 As OrderedSubList = item3.SubLists.AddOrderedSubList(NumberingStyle.RomanUpperCase) subList3.TextColor = RgbColor.DarkGoldenRod Dim item8 As ListItem = subList3.Items.Add("DynamicPDF Generator") Dim item9 As ListItem = subList3.Items.Add("DynamicPDF ReportWriter")
Dim subList4 As OrderedSubList = item6.SubLists.AddOrderedSubList(NumberingStyle.AlphabeticLowerCase) subList4.TextColor = RgbColor.BlueViolet Dim item10 As ListItem = subList4.Items.Add("Community Edition") Dim item11 As ListItem = subList4.Items.Add("Developer Edition") Dim item12 As ListItem = subList4.Items.Add("Server Edition")
Dim subList5 As OrderedSubList = item7.SubLists.AddOrderedSubList(NumberingStyle.AlphabeticLowerCase) subList5.TextColor = RgbColor.BlueViolet Dim item13 As ListItem = subList5.Items.Add("Evaluation Edition") Dim item14 As ListItem = subList5.Items.Add("Developer Edition") Dim item15 As ListItem = subList5.Items.Add("Server Edition")
Dim subList6 As OrderedSubList = item4.SubLists.AddOrderedSubList(NumberingStyle.AlphabeticLowerCase) subList6.TextColor = RgbColor.BlueViolet Dim item16 As ListItem = subList6.Items.Add("Community Edition") Dim item17 As ListItem = subList6.Items.Add("Professional Edition") Dim item18 As ListItem = subList6.Items.Add("Enterprise Edition")
Dim subList7 As OrderedSubList = item5.SubLists.AddOrderedSubList(NumberingStyle.AlphabeticLowerCase) subList7.TextColor = RgbColor.BlueViolet Dim item19 As ListItem = subList7.Items.Add("Standard Edition") Dim item20 As ListItem = subList7.Items.Add("Professional Edition") Dim item21 As ListItem = subList7.Items.Add("Enterprise Edition")
' Add the OrderedList to the Page. MyPage.Elements.Add(list) MyPage.Elements.Add(label1)
' Set the OrderedList 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(){ // Create a PDF Document. Document doc = new Document();
// Create a Page. Page page1 = new Page();
// Create a OrderedList. OrderedList list = new OrderedList(50,120,300,210);
list.ListItemTopMargin = 5; list.ListItemBottomMargin = 5; list.BulletPrefix = "("; list.BulletSuffix = ")"; list.TextColor = RgbColor.HotPink; Label label1 = new Label("CeTe Software specializes in components for dynamic PDF generation and manipulation. The DynamicPDF product line allows you to dynamically generate PDF documents, merge PDF documents and add new content to existing PDF documents from within your applications.",50,50,400,200); label1.Align = TextAlign.Justify;
// Add ListItem to the List. ListItem item1 = list.Items.Add(".NET products"); item1.Underline = true; ListItem item2 = list.Items.Add("JAVA products"); item2.Underline = true; ListItem item3 = list.Items.Add("COM products"); item3.Underline = true;
// Add OrderedSubList under ListItem item1 OrderedSubList subList1 = item1.SubLists.AddOrderedSubList(NumberingStyle.RomanUpperCase); subList1.TextColor = RgbColor.DarkGoldenRod; ListItem item4 = subList1.Items.Add("DynamicPDF Generator for .NET"); ListItem item5 = subList1.Items.Add("DynamicPDF Merger for .NET");
OrderedSubList subList2 = item2.SubLists.AddOrderedSubList(NumberingStyle.RomanUpperCase); subList2.TextColor = RgbColor.DarkGoldenRod; ListItem item6 = subList2.Items.Add("DynamicPDF Generator for JAVA"); ListItem item7 = subList2.Items.Add("DynamicPDF Merger for JAVA");
OrderedSubList subList3 = item3.SubLists.AddOrderedSubList(NumberingStyle.RomanUpperCase); subList3.TextColor = RgbColor.DarkGoldenRod; ListItem item8 = subList3.Items.Add("DynamicPDF Generator"); ListItem item9 = subList3.Items.Add("DynamicPDF ReportWriter");
OrderedSubList subList4 = item6.SubLists.AddOrderedSubList(NumberingStyle.AlphabeticLowerCase); subList4.TextColor = RgbColor.BlueViolet; ListItem item10 = subList4.Items.Add("Community Edition"); ListItem item11 = subList4.Items.Add("Developer Edition"); ListItem item12 = subList4.Items.Add("Server Edition");
OrderedSubList subList5 = item7.SubLists.AddOrderedSubList(NumberingStyle.AlphabeticLowerCase); subList5.TextColor = RgbColor.BlueViolet; ListItem item13 = subList5.Items.Add("Evaluation Edition"); ListItem item14 = subList5.Items.Add("Developer Edition"); ListItem item15 = subList5.Items.Add("Server Edition");
OrderedSubList subList6 = item4.SubLists.AddOrderedSubList(NumberingStyle.AlphabeticLowerCase); subList6.TextColor = RgbColor.BlueViolet; ListItem item16 = subList6.Items.Add("Community Edition"); ListItem item17 = subList6.Items.Add("Professional Edition"); ListItem item18 = subList6.Items.Add("Enterprise Edition");
OrderedSubList subList7 = item5.SubLists.AddOrderedSubList(NumberingStyle.AlphabeticLowerCase); subList7.TextColor = RgbColor.BlueViolet; ListItem item19 = subList7.Items.Add("Standard Edition"); ListItem item20 = subList7.Items.Add("Professional Edition"); ListItem item21 = subList7.Items.Add("Enterprise Edition");
// Add the OrderedList to the Page. page1.Elements.Add(list); page1.Elements.Add(label1);
// Add the Page to the Document. doc.Pages.Add(page1);
// Set the OrderedList 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){ page1= new Page(PageSize.A4); page1.Elements.Add(list); doc.Pages.Add(page1); list = list.GetOverFlowList(); }
// Save the PDF. doc.Draw(@"C:\MyDocument.pdf");}
}

Remarks​

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

GetOverFlowList(Single, Single)​

Gets a OrderedList object containing the List Text.

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

Parameters​

New X coordinate of the OrderedList.

New Y coordinate of the OrderedList.

Returns​

Returns a OrderedList 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 and add it to the document Dim MyPage As Page = New Page MyDocument.Pages.Add(MyPage)
' Create an OrderedList. Dim list As OrderedList = New OrderedList(50,120,300,210)
list.ListItemTopMargin = 5 list.ListItemBottomMargin = 5 list.BulletPrefix = "(" list.BulletSuffix = ")" list.TextColor = RgbColor.HotPink Dim label1 As Label = New Label("CeTe Software specializes in components for dynamic PDF generation and manipulation. The DynamicPDF product line allows you to dynamically generate PDF documents, merge PDF documents and add new content to existing PDF documents from within your applications.",50,50,400,200) label1.Align = TextAlign.Justify
' Add ListItem to the List. Dim item1 As ListItem = list.Items.Add(".NET products") item1.Underline = true Dim item2 As ListItem = list.Items.Add("JAVA products") item2.Underline = true Dim item3 As ListItem = list.Items.Add("COM products") item3.Underline = true
' Add OrderedSubList under ListItem item1 Dim subList1 As OrderedSubList = item1.SubLists.AddOrderedSubList(NumberingStyle.RomanUpperCase) subList1.TextColor = RgbColor.DarkGoldenRod Dim item4 As ListItem = subList1.Items.Add("DynamicPDF Generator for .NET") Dim item5 As ListItem = subList1.Items.Add("DynamicPDF Merger for .NET")
Dim subList2 As OrderedSubList = item2.SubLists.AddOrderedSubList(NumberingStyle.RomanUpperCase) subList2.TextColor = RgbColor.DarkGoldenRod Dim item6 As ListItem = subList2.Items.Add("DynamicPDF Generator for JAVA") Dim item7 As ListItem = subList2.Items.Add("DynamicPDF Merger for JAVA")
Dim subList3 As OrderedSubList = item3.SubLists.AddOrderedSubList(NumberingStyle.RomanUpperCase) subList3.TextColor = RgbColor.DarkGoldenRod Dim item8 As ListItem = subList3.Items.Add("DynamicPDF Generator") Dim item9 As ListItem = subList3.Items.Add("DynamicPDF ReportWriter")
Dim subList4 As OrderedSubList = item6.SubLists.AddOrderedSubList(NumberingStyle.AlphabeticLowerCase) subList4.TextColor = RgbColor.BlueViolet Dim item10 As ListItem = subList4.Items.Add("Community Edition") Dim item11 As ListItem = subList4.Items.Add("Developer Edition") Dim item12 As ListItem = subList4.Items.Add("Server Edition")
Dim subList5 As OrderedSubList = item7.SubLists.AddOrderedSubList(NumberingStyle.AlphabeticLowerCase) subList5.TextColor = RgbColor.BlueViolet Dim item13 As ListItem = subList5.Items.Add("Evaluation Edition") Dim item14 As ListItem = subList5.Items.Add("Developer Edition") Dim item15 As ListItem = subList5.Items.Add("Server Edition")
Dim subList6 As OrderedSubList = item4.SubLists.AddOrderedSubList(NumberingStyle.AlphabeticLowerCase) subList6.TextColor = RgbColor.BlueViolet Dim item16 As ListItem = subList6.Items.Add("Community Edition") Dim item17 As ListItem = subList6.Items.Add("Professional Edition") Dim item18 As ListItem = subList6.Items.Add("Enterprise Edition")
Dim subList7 As OrderedSubList = item5.SubLists.AddOrderedSubList(NumberingStyle.AlphabeticLowerCase) subList7.TextColor = RgbColor.BlueViolet Dim item19 As ListItem = subList7.Items.Add("Standard Edition") Dim item20 As ListItem = subList7.Items.Add("Professional Edition") Dim item21 As ListItem = subList7.Items.Add("Enterprise Edition")
' Add the OrderedList to the Page. MyPage.Elements.Add(list) MyPage.Elements.Add(label1)
' Set the OrderedList 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(){ // Create a PDF Document. Document doc = new Document();
// Create a Page. Page page1 = new Page();
// Create a OrderedList. OrderedList list = new OrderedList(50,120,300,500);
list.ListItemTopMargin = 5; list.ListItemBottomMargin = 5; list.BulletPrefix = "("; list.BulletSuffix = ")"; list.TextColor = RgbColor.HotPink; Label label1 = new Label("CeTe Software specializes in components for dynamic PDF generation and manipulation. The DynamicPDF product line allows you to dynamically generate PDF documents, merge PDF documents and add new content to existing PDF documents from within your applications.",50,50,400,200); label1.Align = TextAlign.Justify;
// Add ListItem to the List. ListItem item1 = list.Items.Add(".NET products"); item1.Underline = true; ListItem item2 = list.Items.Add("JAVA products"); item2.Underline = true; ListItem item3 = list.Items.Add("COM products"); item3.Underline = true;
// Add OrderedSubList under ListItem item1 OrderedSubList subList1 = item1.SubLists.AddOrderedSubList(NumberingStyle.RomanUpperCase); subList1.TextColor = RgbColor.DarkGoldenRod; ListItem item4 = subList1.Items.Add("DynamicPDF Generator for .NET"); ListItem item5 = subList1.Items.Add("DynamicPDF Merger for .NET");
OrderedSubList subList2 = item2.SubLists.AddOrderedSubList(NumberingStyle.RomanUpperCase); subList2.TextColor = RgbColor.DarkGoldenRod; ListItem item6 = subList2.Items.Add("DynamicPDF Generator for JAVA"); ListItem item7 = subList2.Items.Add("DynamicPDF Merger for JAVA");
OrderedSubList subList3 = item3.SubLists.AddOrderedSubList(NumberingStyle.RomanUpperCase); subList3.TextColor = RgbColor.DarkGoldenRod; ListItem item8 = subList3.Items.Add("DynamicPDF Generator"); ListItem item9 = subList3.Items.Add("DynamicPDF ReportWriter");
OrderedSubList subList4 = item6.SubLists.AddOrderedSubList(NumberingStyle.AlphabeticLowerCase); subList4.TextColor = RgbColor.BlueViolet; ListItem item10 = subList4.Items.Add("Community Edition"); ListItem item11 = subList4.Items.Add("Developer Edition"); ListItem item12 = subList4.Items.Add("Server Edition");
OrderedSubList subList5 = item7.SubLists.AddOrderedSubList(NumberingStyle.AlphabeticLowerCase); subList5.TextColor = RgbColor.BlueViolet; ListItem item13 = subList5.Items.Add("Evaluation Edition"); ListItem item14 = subList5.Items.Add("Developer Edition"); ListItem item15 = subList5.Items.Add("Server Edition");
OrderedSubList subList6 = item4.SubLists.AddOrderedSubList(NumberingStyle.AlphabeticLowerCase); subList6.TextColor = RgbColor.BlueViolet; ListItem item16 = subList6.Items.Add("Community Edition"); ListItem item17 = subList6.Items.Add("Professional Edition"); ListItem item18 = subList6.Items.Add("Enterprise Edition");
OrderedSubList subList7 = item5.SubLists.AddOrderedSubList(NumberingStyle.AlphabeticLowerCase); subList7.TextColor = RgbColor.BlueViolet; ListItem item19 = subList7.Items.Add("Standard Edition"); ListItem item20 = subList7.Items.Add("Professional Edition"); ListItem item21 = subList7.Items.Add("Enterprise Edition");
// Add the OrderedList to the Page. page1.Elements.Add(list); page1.Elements.Add(label1);
// Add the Page to the Document. doc.Pages.Add(page1);
// Set the OrderedList 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){ page1= new Page(PageSize.A4); page1.Elements.Add(list); doc.Pages.Add(page1); list = list.GetOverFlowList(50,50); } // Save the PDF. doc.Draw(@"C:\MyDocument.pdf");}
}

Remarks​

This method returns a new OrderedList 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