See Also

Template 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 document or section template.

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

Object Model


Inheritance Hierarchy

System.Object
   ceTe.DynamicPDF.Template
      ceTe.DynamicPDF.EvenOddTemplate

Syntax

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

Remarks

See the Templates topic for more on templates.

Example

This example shows how to create a template 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 Template = New Template
        MyTemplate.Elements.Add(New Label("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 
        Template template = new Template(); 
        template.Elements.Add( new Label( "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" ); 
    } 
}

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

Template Members  | ceTe.DynamicPDF Namespace

 

 


© Copyright 2006, ceTe Software