Represents a PDF Document.

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


System.Object
public class Document : Object 

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 System.IO.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" );
    }
}

Requirements

Namespace: ceTe.DynamicPDF Namespace

Assembly: DynamicPDF.Generator.[Edition].dll

See Also

Document members | ceTe.DynamicPDF Namespace