Represents the dimensions of a page.
For a list of all members of this type, see PageDimensions members.
![]() ![]() ![]() ![]()
|
ceTe.DynamicPDF.AreaDimensions
ceTe.DynamicPDF.PageDimensions
ceTe.DynamicPDF.ExtendedPageDimensions
[Visual Basic]
Public Class PageDimensions
Inherits AreaDimensions[C#]
public class PageDimensions : AreaDimensionsThis class can be used to specify the dimensions and other formatting details of a page. It can then be passed into a Page constructor.
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.
[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 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
[C#]
using System; |
This class is a DynamicPDF Generator Community Edition feature.
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)
PageDimensions Members | ceTe.DynamicPDF Namespace
© Copyright 2006, ceTe Software