Page

Represents a page.

public class Page
Public Class Page

Inheritance: ObjectPage

Derived: AppendedPage, ImportedPage

Licensing Info

This class is a DynamicPDF Core Suite Essentials feature. One of the following is required for non-evaluation usage:

Examples

The following example creates a new page using a PageDimensions to set the margins of that page. It then places a label on the page and rotates the page 90 degrees.
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 dimensions object and set the margins
        Dim dimensions As PageDimensions = New PageDimensions(PageSize.Letter, PageOrientation.Portrait)
        dimensions.BottomMargin = 50
        dimensions.TopMargin = 50
        dimensions.LeftMargin = 35
        dimensions.RightMargin = 35
     	
        ' Create a page using a page dimensions object and add it to the document
        Dim MyPage As Page = New Page(dimensions)
        MyDocument.Pages.Add(MyPage)
     
        ' Add a label to the page
        MyPage.Elements.Add(New Label("this page was rotated 90 degrees.", 0, 0, 300, 20, Font.Helvetica, 18))
     
        ' Rotate the page 90 degrees
        MyPage.Rotate = 90
     
        ' Save the PDF
        MyDocument.Draw("C:\MyDocument.pdf")
     		
    End Sub
End Module
using System;
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 dimensions object and set the margins
        PageDimensions dimensions = new PageDimensions(PageSize.Letter, PageOrientation.Portrait);
        dimensions.BottomMargin = 50;
        dimensions.TopMargin = 50;
        dimensions.LeftMargin = 35;
        dimensions.RightMargin = 35;

        // Create a page using a page dimensions object and add it to the document
        Page page = new Page(dimensions);
        document.Pages.Add(page);

        // Add a label to the page
        page.Elements.Add(new Label("This page was rotated 90 degrees.", 0, 0, 300, 20, Font.Helvetica, 18));

        // Rotate the page 90 degrees
        page.Rotate = 90;

        // Save the PDF
        document.Draw(outputPath);
    }
}

Remarks

This class can be used to create pages to add to your Document .

Constructors

Page()Initializes a new instance of the Page class.
Page(PageDimensions)Initializes a new instance of the Page class.
Page(PageSize)Initializes a new instance of the Page class.
Page(PageSize, PageOrientation)Initializes a new instance of the Page class.
Page(PageSize, PageOrientation, Single)Initializes a new instance of the Page class.
Page(PageSize, Single)Initializes a new instance of the Page class.
Page(Single, Single)Initializes a new instance of the Page class.
Page(Single, Single, Single)Initializes a new instance of the Page class.

Properties

ApplyDocumentTemplateGets or sets a value indicating if this page uses the documents template.
ApplySectionTemplateGets or sets a value indicating if this page uses the sections template.
DimensionsGets or sets the dimensions of the page.
ElementsGets a collection of page elements.
ReaderEventsGets the reader events of the page.
RotateGets or sets the rotation of the page.
UnderlyingElementsGets a collection of page elements that will appear beneath (behind) the page elements from the Elements property.

Methods

Equals(Object)Determines whether the specified Object is equal to the current Object .
(Inherited from Object)
GetHashCode()Serves as a hash function for a particular type.
(Inherited from Object)
GetType()Gets the Type of the current instance.
(Inherited from Object)
ToString()Returns a String that represents the current Object .
(Inherited from Object)

See Also

ceTe.DynamicPDF

In this topic