UnorderedList.GetOverFlowList

Overloads

GetOverFlowList()Gets a UnorderedList object containing the List Text.
GetOverFlowList(Single, Single)Gets a UnorderedList object containing the List Text.

GetOverFlowList()

Gets a UnorderedList object containing the List Text.

public UnorderedList GetOverFlowList()
Function GetOverFlowList() As UnorderedList

Returns

UnorderedList

Returns a UnorderedList object.

Licensing Info

This method is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

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.
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;

public class Example
{
    public static void CreatePDF(string outputPath)
	{
  	    // Create a PDF Document
		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(outputPath);
	}
}

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

x
Single

New X coordinate of the UnorderedList.

y
Single

New Y coordinate of the UnorderedList.

Returns

UnorderedList

Returns a UnorderedList object.

Licensing Info

This method is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

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.
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;

public class Example
{
    public static void CreatePDF(string outputPath)
	{
  	    // Create a PDF Document
		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(outputPath);
	}
}

Remarks

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

See Also

UnorderedList
ceTe.DynamicPDF.PageElements

In this topic