Represents an even / odd section or document template.

For a list of all members of this type, see EvenOddTemplate Members


System.Object
   ceTe.DynamicPDF.Template
public class EvenOddTemplate : Template 

Remarks

This class can be used to define a template that can contain separate information to go on even and odd pages. See the Templates topic for more on Templates.

Example

This example shows how to create an EvenOddTemplate and add it to the document.

[Visual Basic]
Imports System
Imports ceTe.DynamicPDF

Module MyModule
        
    Sub Main()

        ' Create a PDF Document
        Dim MyDocument As Document = New Document
        
        ' Add 5 blank pages to the document
        MyDocument.Pages.Add(New Page(PageSize.Letter))
        MyDocument.Pages.Add(New Page(PageSize.Letter))
        MyDocument.Pages.Add(New Page(PageSize.Letter))
        MyDocument.Pages.Add(New Page(PageSize.Letter))
        MyDocument.Pages.Add(New Page(PageSize.Letter))
        
        ' Create an even odd template and add elements to it
        Dim MyTemplate As EvenOddTemplate = New EvenOddTemplate
        MyTemplate.EvenElements.Add(New Label("Even Header", 0, 0, 200, 12))
        MyTemplate.OddElements.Add(New Label("Odd Header", 0, 0, 200, 12)) 
        MyTemplate.Elements.Add(New Label("Footer", 0, 680, 200, 12))
        
        ' Add the template to the document
        MyDocument.Template = MyTemplate

        ' 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();
        
        // Add 5 blank pages to the document
        document.Pages.Add( new Page( PageSize.Letter ) );
        document.Pages.Add( new Page( PageSize.Letter ) );
        document.Pages.Add( new Page( PageSize.Letter ) );
        document.Pages.Add( new Page( PageSize.Letter ) );
        document.Pages.Add( new Page( PageSize.Letter ) );
        
        // Create an even odd template and add elements to it
        EvenOddTemplate template = new EvenOddTemplate();
        template.EvenElements.Add( new Label( "Even Header", 0, 0, 200, 12 ) );
        template.OddElements.Add( new Label( "Odd Header", 0, 0, 200, 12 ) );
        template.Elements.Add( new Label( "Footer", 0, 680, 200, 12 ) );
        
        // Add the template to the document
        document.Template = template;
        
        // Save the PDF document
        document.Draw( @"C:\MyDocument.pdf" );
    }
}

Requirements

Namespace: ceTe.DynamicPDF Namespace

Assembly: DynamicPDF.Generator.[Edition].dll

See Also

EvenOddTemplate members | ceTe.DynamicPDF Namespace