Gets or sets a Template object for the Document. All page elements within this Template will appear in the background of the other contents of the PDF.
[Visual Basic]
Public Property Template As Template[C#]
public Template Template {get; set;}The documents Template object.
See the Templates topic for more on templates.
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; |
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family
Document Class | Document Members
© Copyright 2007, ceTe Software