See Also

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

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

Object Model












Inheritance Hierarchy

System.Object
   ceTe.DynamicPDF.Document
      ceTe.DynamicPDF.Merger.MergeDocument

Syntax

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

Remarks

This is the primary class used to generate the Dynamic PDF document. It represents a single PDF Document and is made up of Pages and Outlines. The document can have a Security object associated with it to control document security and encryption. The document can be output to any object derived from the Stream class that supports writing and can easily be integrated with ASP.NET to stream the document to Internet Information Server's HTTP output stream.

Example

This example shows how to use the document in the creation of a simple PDF document.

[Visual Basic] 

Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements

Module MyModule

    Sub Main()

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

        ' Create a Page and add it to the document
        Dim MyPage As Page = New Page
        MyDocument.Pages.Add(MyPage)

        ' Add a label to the page
        MyPage.Elements.Add(New Label("My PDF Document", 0, 0, 512, 40, Font.Helvetica, 30, TextAlign.Center))

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

    End Sub
End Module

[C#] 

using System; 
using ceTe.DynamicPDF; 
using ceTe.DynamicPDF.PageElements; 
 
class MyClass 

    static void Main() 
    { 
        // Create a PDF Document 
        Document document = new Document(); 
 
        // Create a Page and add it to the document 
        Page page = new Page(); 
        document.Pages.Add( page ); 
 
        // Add a label to the page  
        page.Elements.Add( new Label( "My PDF Document", 0, 0, 512, 40, Font.Helvetica, 30, TextAlign.Center ) ); 
 
        // Save the PDF document 
        document.Draw( @"C:\MyDocument.pdf" ); 
    } 
}

Licensing

This class is a DynamicPDF Generator Community Edition feature. Some properties require additional licensing and are noted accordingly.

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

Document Members  | ceTe.DynamicPDF Namespace

 

 


© Copyright 2007, ceTe Software