See Also

SectionList Members  | ceTe.DynamicPDF Namespace

Requirements

Namespace: ceTe.DynamicPDF

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

Assembly: ceTe.DynamicPDF (in ceTe.DynamicPDF.dll)

Language

Visual Basic

C#

Show All

Represents a collection of sections associated with a document.

For a list of all members of this type, see SectionList members.

Inheritance Hierarchy

System.Object
   ceTe.DynamicPDF.SectionList

Syntax

[Visual Basic]
Public Class SectionList
[C#]
public class SectionList

Remarks

For more details on sections take a look at the Document Sectioning topic.

Example

This example shows how to break the document into different sections.

[Visual Basic] 

Imports System
Imports ceTe.DynamicPDF

Module MyModule

    Sub Main()

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

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

        'Add the template to the document
        MyDocument.Template = MyTemplate

        'Begin the first section
        MyDocument.Sections.Begin(NumberingStyle.RomanLowerCase)
        'Add two pages
        MyDocument.Pages.Add(New Page) 'Page 1
        MyDocument.Pages.Add(New Page) 'Page 2

        'Begin the second section
        MyDocument.Sections.Begin(NumberingStyle.Numeric, MyTemplate)
        'Add three pages
        MyDocument.Pages.Add(New Page) 'Page 3
        MyDocument.Pages.Add(New Page) 'page 4
        MyDocument.Pages.Add(New Page) 'page 5

        'Begin the third section specifying a section prefix
        MyDocument.Sections.Begin(NumberingStyle.RomanLowerCase, "Appendix A - ")
        'Add two pages
        MyDocument.Pages.Add(New Page) 'page 6
        MyDocument.Pages.Add(New Page) 'page 7

        ' Save the PDF document
        MyDocument.Draw("C:\MyDocument.pdf")

    End Sub
End Module

[C#] 

using System; 
using ceTe.DynamicPDF; 
 
class MyClass 

    static void Main() 
    { 
        // 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( "!UNRECOGNISED ELEMENT TYPE 'SP'! of !UNRECOGNISED ELEMENT TYPE '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( @"C:\MyDocument.pdf" ); 
    } 

    

Licensing

This class is a DynamicPDF Generator Community Edition feature.

Requirements

Namespace: ceTe.DynamicPDF

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

Assembly: ceTe.DynamicPDF (in ceTe.DynamicPDF.dll)

See Also

SectionList Members  | ceTe.DynamicPDF Namespace

 

 


© Copyright 2006, ceTe Software