cete.dynamicpdf.page
Page
- Namespace: ceTe.DynamicPDF
- Assemblies: DynamicPDF.CoreSuite.dll
Represents a page.
public class Page
Public Class Page
Inheritance: Object → Page
Derived: AppendedPage, ImportedPage
Licensing Info
This class is a DynamicPDF Core Suite Essentials feature. One of the following is required for non-evaluation usage:
- Any active DynamicPDF Subscription (Essentials, Professional, Professional Plus or Ultimate).
- A DynamicPDF Core Suite for .NET v12.X Essentials license.
- It can also be used for free with a public link back to www.dynamicpdf.com and with the DynamicPDF Essentials message displaying on the bottom of each page.
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.
public Page()
Public Sub New ()
Licensing Info
This constructor is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:
- An active DynamicPDF Ultimate Subscription
- An active DynamicPDF Professional or Professional Plus Subscription with DynamicPDF Core Suite selected.
- A DynamicPDF Core Suite for .NET v12.X Developer License.
Page(PageDimensions)
Initializes a new instance of the Page class.
public Page(PageDimensions dimensions)
Public Sub New (dimensions As PageDimensions)
Parameters
- dimensions: PageDimensions
The PageDimensions of the page.
Licensing Info
This constructor is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:
- An active DynamicPDF Ultimate Subscription
- An active DynamicPDF Professional or Professional Plus Subscription with DynamicPDF Core Suite selected.
- A DynamicPDF Core Suite for .NET v12.X Developer License.
Page(PageSize)
Initializes a new instance of the Page class.
public Page(PageSize size)
Public Sub New (size As PageSize)
Parameters
- size: PageSize
The PageSize representing the dimensions of the page.
Licensing Info
This constructor is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:
- An active DynamicPDF Ultimate Subscription
- An active DynamicPDF Professional or Professional Plus Subscription with DynamicPDF Core Suite selected.
- A DynamicPDF Core Suite for .NET v12.X Developer License.
Page(PageSize, PageOrientation)
Initializes a new instance of the Page class.
public Page(PageSize size, PageOrientation orientation)
Public Sub New (size As PageSize, orientation As PageOrientation)
Parameters
- size: PageSize
The PageSize representing the dimensions of the page.
- orientation: PageOrientation
The PageOrientation of the page.
Licensing Info
This constructor is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:
- An active DynamicPDF Ultimate Subscription
- An active DynamicPDF Professional or Professional Plus Subscription with DynamicPDF Core Suite selected.
- A DynamicPDF Core Suite for .NET v12.X Developer License.
Page(PageSize, PageOrientation, Single)
Initializes a new instance of the Page class.
public Page(PageSize size, PageOrientation orientation, float margins)
Public Sub New (size As PageSize, orientation As PageOrientation, margins As Single)
Parameters
- size: PageSize
The PageSize representing the dimensions of the page.
- orientation: PageOrientation
The PageOrientation of the page.
- margins: Single
The margins of the page.
Licensing Info
This constructor is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:
- An active DynamicPDF Ultimate Subscription
- An active DynamicPDF Professional or Professional Plus Subscription with DynamicPDF Core Suite selected.
- A DynamicPDF Core Suite for .NET v12.X Developer License.
Page(PageSize, Single)
Initializes a new instance of the Page class.
public Page(PageSize size, float margins)
Public Sub New (size As PageSize, margins As Single)
Parameters
- size: PageSize
The PageSize representing the dimensions of the page.
- margins: Single
The margins of the page.
Licensing Info
This constructor is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:
- An active DynamicPDF Ultimate Subscription
- An active DynamicPDF Professional or Professional Plus Subscription with DynamicPDF Core Suite selected.
- A DynamicPDF Core Suite for .NET v12.X Developer License.
Page(Single, Single)
Initializes a new instance of the Page class.
public Page(float width, float height)
Public Sub New (width As Single, height As Single)
Parameters
- width: Single
The width of the page.
- height: Single
The height of the page.
Licensing Info
This constructor is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:
- An active DynamicPDF Ultimate Subscription
- An active DynamicPDF Professional or Professional Plus Subscription with DynamicPDF Core Suite selected.
- A DynamicPDF Core Suite for .NET v12.X Developer License.
Page(Single, Single, Single)
Initializes a new instance of the Page class.
public Page(float width, float height, float margins)
Public Sub New (width As Single, height As Single, margins As Single)
Parameters
- width: Single
The width of the page.
- height: Single
The height of the page.
- margins: Single
The margins of the page.
Licensing Info
This constructor is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:
- An active DynamicPDF Ultimate Subscription
- An active DynamicPDF Professional or Professional Plus Subscription with DynamicPDF Core Suite selected.
- A DynamicPDF Core Suite for .NET v12.X Developer License.
Properties
ApplyDocumentTemplate
Gets or sets a value indicating if this page uses the documents template.
public bool ApplyDocumentTemplate { get; set; }
Public Property ApplyDocumentTemplate As Boolean
Property Value
Licensing Info
This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:
- An active DynamicPDF Ultimate Subscription
- An active DynamicPDF Professional or Professional Plus Subscription with DynamicPDF Core Suite selected.
- A DynamicPDF Core Suite for .NET v12.X Developer License.
ApplySectionTemplate
Gets or sets a value indicating if this page uses the sections template.
public bool ApplySectionTemplate { get; set; }
Public Property ApplySectionTemplate As Boolean
Property Value
Licensing Info
This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:
- An active DynamicPDF Ultimate Subscription
- An active DynamicPDF Professional or Professional Plus Subscription with DynamicPDF Core Suite selected.
- A DynamicPDF Core Suite for .NET v12.X Developer License.
Dimensions
Gets or sets the dimensions of the page.
public PageDimensions Dimensions { get; set; }
Public Property Dimensions As PageDimensions
Property Value
Licensing Info
This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:
- An active DynamicPDF Ultimate Subscription
- An active DynamicPDF Professional or Professional Plus Subscription with DynamicPDF Core Suite selected.
- A DynamicPDF Core Suite for .NET v12.X Developer License.
Elements
Gets a collection of page elements.
public Group Elements { get; }
Public Property Elements As Group
Property Value
Licensing Info
This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:
- An active DynamicPDF Ultimate Subscription
- An active DynamicPDF Professional or Professional Plus Subscription with DynamicPDF Core Suite selected.
- A DynamicPDF Core Suite for .NET v12.X Developer License.
ReaderEvents
Gets the reader events of the page.
public PageReaderEvents ReaderEvents { get; }
Public Property ReaderEvents As PageReaderEvents
Property Value
Licensing Info
This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:
- An active DynamicPDF Ultimate Subscription
- An active DynamicPDF Professional or Professional Plus Subscription with DynamicPDF Core Suite selected.
- A DynamicPDF Core Suite for .NET v12.X Developer License.
Rotate
Gets or sets the rotation of the page.
public int Rotate { get; set; }
Public Property Rotate As Int32
Property Value
Licensing Info
This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:
- An active DynamicPDF Ultimate Subscription
- An active DynamicPDF Professional or Professional Plus Subscription with DynamicPDF Core Suite selected.
- A DynamicPDF Core Suite for .NET v12.X Developer License.
TabOrder
Gets or Sets the tab order for the page.
public TabOrder TabOrder { get; set; }
Public Property TabOrder As TabOrder
Property Value
Licensing Info
This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:
- An active DynamicPDF Ultimate Subscription
- An active DynamicPDF Professional or Professional Plus Subscription with DynamicPDF Core Suite selected.
- A DynamicPDF Core Suite for .NET v12.X Developer License.
UnderlyingElements
Gets a collection of page elements that will appear beneath (behind) the page elements from the Elements property.
public Group UnderlyingElements { get; }
Public Property UnderlyingElements As Group
Property Value
Licensing Info
This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:
- An active DynamicPDF Ultimate Subscription
- An active DynamicPDF Professional or Professional Plus Subscription with DynamicPDF Core Suite selected.
- A DynamicPDF Core Suite for .NET v12.X Developer License.
Methods
Equals(Object)
Determines whether the specified Object is equal to the current Object . (Inherited from Object)
public bool Equals(Object obj)
Function Equals(obj As Object) As Boolean
Parameters
- obj: Object
The Object to compare with the current Object .
Returns
true if the specified Object is equal to the current Object ; otherwise, false.
Licensing Info
This method is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:
- An active DynamicPDF Ultimate Subscription
- An active DynamicPDF Professional or Professional Plus Subscription with DynamicPDF Core Suite selected.
- A DynamicPDF Core Suite for .NET v12.X Developer License.
GetHashCode()
Serves as a hash function for a particular type. (Inherited from Object)
public int GetHashCode()
Function GetHashCode() As Integer
Returns
A hash code for the current Object .
Licensing Info
This method is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:
- An active DynamicPDF Ultimate Subscription
- An active DynamicPDF Professional or Professional Plus Subscription with DynamicPDF Core Suite selected.
- A DynamicPDF Core Suite for .NET v12.X Developer License.
GetType()
Gets the Type of the current instance. (Inherited from Object)
public Type GetType()
Function GetType() As Type
Returns
The Type instance that represents the exact runtime type of the current instance.
Licensing Info
This method is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:
- An active DynamicPDF Ultimate Subscription
- An active DynamicPDF Professional or Professional Plus Subscription with DynamicPDF Core Suite selected.
- A DynamicPDF Core Suite for .NET v12.X Developer License.
ToString()
Returns a String that represents the current Object . (Inherited from Object)
public string ToString()
Function ToString() As String
Returns
A String that represents the current Object .
Licensing Info
This method is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:
- An active DynamicPDF Ultimate Subscription
- An active DynamicPDF Professional or Professional Plus Subscription with DynamicPDF Core Suite selected.
- A DynamicPDF Core Suite for .NET v12.X Developer License.