Document.Sections Property

Gets a SectionList object for the Document .

public SectionList Sections { get; }

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