Document.Sections Property

Gets a SectionList object for the Document .

public SectionList Sections { get; }
Public ReadOnly Property Sections As SectionList

Property Value

SectionList

Licensing Info

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

Examples

This example shows how to break the document into different sections.
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Imports ceTe.DynamicPDF.PageElements.Html
     
Module MyModule
     
    Sub Main()

	    'Create a PDF Document
        Dim document As Document = New Document

        'Create a template object and add a page numbering label
        Dim template As Template = New Template
        template.Elements.Add(New PageNumberingLabel("%%SP%% of %%ST%%", 0, 680, 512, 12, Font.Helvetica, 12, TextAlign.Center))

        document.Template = template

        'Begin the first section
        document.Sections.Begin(NumberingStyle.RomanLowerCase)
        'Add two pages
        document.Pages.Add(New Page)
        'Page 1
        document.Pages.Add(New Page)
        'Page 2
        'Begin the second section
        document.Sections.Begin(NumberingStyle.Numeric, template)
        'Add three pages
        document.Pages.Add(New Page)
        'Page 3
        document.Pages.Add(New Page)
        'page 4
        document.Pages.Add(New Page)
        'page 5
        'Begin the third section specifying a section prefix
        document.Sections.Begin(NumberingStyle.RomanLowerCase, "Appendix A - ")
        'Add two pages
        document.Pages.Add(New Page)
        'page 6
        document.Pages.Add(New Page)
        'page 7
        ' Save the PDF document
        document.Draw(outputPath)
	   
    End Sub
End Module
using System;
using ceTe.DynamicPDF;	

public class Example 
{
    public static void CreatePDF(string outputPath)
    {
        // Create a PDF Document
        Document document = new Document();

        //Create a template object and add a page numbering label
        Template template = new Template();
        template.Elements.Add(new PageNumberingLabel("%%SP%% of %%ST%%", 0, 680, 512, 12, Font.Helvetica, 12, TextAlign.Center));

        document.Template = template;

        //Begin the first section
        document.Sections.Begin(NumberingStyle.RomanLowerCase);
        //Add two pages
        document.Pages.Add(new Page()); //Page 1
        document.Pages.Add(new Page()); //Page 2

        //Begin the second section
        document.Sections.Begin(NumberingStyle.Numeric, template);
        //Add three pages
        document.Pages.Add(new Page()); //Page 3
        document.Pages.Add(new Page()); //page 4
        document.Pages.Add(new Page()); //page 5

        //Begin the third section specifying a section prefix
        document.Sections.Begin(NumberingStyle.RomanLowerCase, "Appendix A - ");
        //Add two pages
        document.Pages.Add(new Page()); //page 6
        document.Pages.Add(new Page()); //page 7

        // Save the PDF document
        document.Draw(outputPath);
    }
}

Remarks

Used to break a document into sections. See the Document Sectioning topic for more details.

See Also

Document
ceTe.DynamicPDF

In this topic