Document

Represents a PDF Document.

public class Document
Public Class Document

Inheritance: ObjectDocument

Derived: MergeDocument

Licensing Info

Basic usage of this class is a DynamicPDF Core Suite Essentials feature. However, some properties or methods require full licensing and are noted accordingly. One of the following is required for non-evaluation usage:

Examples

This example shows how to use the document in the creation of a simple PDF document.
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
using System;
using System.IO;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
 
public class Example
{
    public static void CreatePDF(string outputPath)
     {
         // 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(outputPath);
     }
}

Remarks

This is the primary class used to generate the 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.

Constructors

Document()Initializes a new instance of the Document class.

Properties

AuthorGets or sets a value indicating the author of the Document .
CompressionLevelGets or sets a value indicating the compression level of the Document .
CreatorGets or sets a value indicating the creator of the Document .
CustomPropertiesGets or sets a value indicating the custom properties of the Document .
DefaultPdfFormatGets or sets the default format for the PDF document.
DefaultPdfVersionGets or sets the default version for the PDF document.
DiskBufferingGets or sets the disk buffering options for the PDF document.
EmbeddedFilesGets an EmbeddedFileList containing the EmbeddedFile for the document.
FormGets or sets a form object for the PDF document.
InitialPageGets or sets a value indicating the initial page of the Document .
InitialPageLayoutGets or sets a value indicating the initial layout of the Document .
InitialPageModeGets or sets a value indicating the initial page mode of the Document .
InitialPageZoomGets or sets a value indicating the initial zoom of the Document .
InitialPageZoomPercentageGets or sets initial page zoom percentage.
JavaScriptsGets a DocumentJavaScriptList containing the JavaScript entries for that document.
KeywordsGets or sets a value indicating the keywords of the Document .
LanguageGets or sets a value indicating the language of the Document .
OptimizationGets or sets the document optimization.
OutlinesGets an OutlineList object that represents the top level outlines of the Document .
OutputIntentsGets the output intent list for the Document .
PackageGets or sets the document package.
PagesGets a PageList object that represents the pages of the Document .
PdfFormatGets or sets the PDF format for the PDF document.
PdfVersionGets or sets the PDF version of the PDF document.
PdfXVersionGets or sets the PDF/X version for the Document .
ProducerGets or sets a value indicating the producer of the Document .
ProductBuildGets the product build.
ProductVersionGets the product version.
ReaderEventsGets the reader events of the document.
SectionsGets a SectionList object for the Document .
SecurityGets or sets an object to control the security and encryption of the Document .
StampTemplateGets or sets a Template object for the Document . All page elements within this Template will appear in the foreground of the other contents of the PDF.
SubjectGets or sets a value indicating the subject of the Document .
TagGets or sets a value indicating whether document is tagged.
TemplateGets 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.
TitleGets or sets a value indicating the title of the Document .
TrappedGets or sets a value indicating if trapping information is present in the Document .
ViewerPreferencesGets a ViewerPreferences object that represents the viewer preferences of the Document .
XmpMetadataGets or sets the XMP metadata for the PDF document.

Methods

AddLicense(String)Adds a license key.
Certify(String, Certificate, Boolean, CertifyingPermission)Certifies with signing and Time stamping the document digitally.
Certify(String, Certificate, CertifyingPermission)Certifies with signing the document digitally.
Certify(String, Certificate, TimestampServer, CertifyingPermission)Certifies with signing and Time stamping the document digitally.
Certify(String, SigningProvider, CertifyingPermission)Certifies with signing and Time stamping the document digitally.
Draw()Outputs the generated Document to a byte array.
Draw(Stream)Outputs the generated Document to the given Stream object.
Draw(String)Outputs the generated Document to a file.
Equals(Object)Determines whether the specified Object is equal to the current Object .
(Inherited from Object)
FromHtml(Stream, PageDimensions, HtmlAreaPadding)Gets a Document containing HtmlArea created with the given content.
FromHtml(Stream, PageDimensions, HtmlAreaPadding, Uri)Gets a Document containing HtmlArea created with the given content.
FromHtml(Stream, PageDimensions, Uri)Gets a Document containing HtmlArea created with the given content.
FromHtml(String, PageDimensions, HtmlAreaPadding)Gets a Document containing HtmlArea created with the given content.
FromHtml(String, PageDimensions, HtmlAreaPadding, Uri)Gets a Document containing HtmlArea created with the given content.
FromHtml(String, PageDimensions, Uri)Gets a Document containing HtmlArea created with the given content.
FromHtml(Uri, PageDimensions, HtmlAreaPadding)Gets a Document containing HtmlArea created with the given content.
FromHtml(Uri, PageDimensions, HtmlAreaPadding, Uri)Gets a Document containing HtmlArea created with the given content.
FromHtml(Uri, PageDimensions, Uri)Gets a Document containing HtmlArea created with the given content.
GetHashCode()Serves as a hash function for a particular type.
(Inherited from Object)
GetType()Gets the Type of the current instance.
(Inherited from Object)
Sign(String, Certificate)Sign this document digitally.
Sign(String, Certificate, Boolean)Digitally sign this document with Time stamping.
Sign(String, Certificate, TimestampServer)Digitally sign this document with Time stamping.
Sign(String, SigningProvider)Digitally sign this document with SigningProvider.
Timestamp(String, SigningProvider)Marks the document to add a timestamp to the existing signature filed.
Timestamp(String, TimestampServer)Marks the document to add a timestamp to the existing signature filed.
ToString()Returns a String that represents the current Object .
(Inherited from Object)

See Also

ceTe.DynamicPDF

In this topic