cete.dynamicpdf.merger.importedpagearea
ImportedPageArea
- Namespace: ceTe.DynamicPDF.Merger
- Assemblies: DynamicPDF.CoreSuite.dll
Represents an imported pages area.
public class ImportedPageArea : PageElement, IArea, ICoordinate, ISerializable
Public Class ImportedPageArea
Inherits PageElement
Implements IArea, ICoordinate, ISerializable
Inheritance: Object → PageElement → ImportedPageArea
Implements: IArea, ICoordinate, ISerializable
Licensing Info
This class 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.
Constructors
ImportedPageArea(Byte[], Int32, Single, Single, [Optional] Single)
Initializes a new instance of the ImportedPageArea class.
public ImportedPageArea(Byte[] pdfData, int pageNumber, float x, float y, [float scale = 1])
Public Sub New (pdfData As Byte(), pageNumber As Integer, x As Single, y As Single, Optional scale As Single = 1)
Parameters
- pdfData: Byte[]
Byte array of the PDF document to import.
- pageNumber: Int32
Page number to import.
- x: Single
X coordinate of the imported page area.
- y: Single
Y coordinate of the imported page area.
- scale: Single
The scale to use when rendering the imported page area.
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.
ImportedPageArea(ImportedPageContents, Single, Single)
Initializes a new instance of the ImportedPageArea class.
public ImportedPageArea(ImportedPageContents contents, float x, float y)
Public Sub New (contents As ImportedPageContents, x As Single, y As Single)
Parameters
- contents: ImportedPageContents
ImportedPageContents object containing the page's contents.
- x: Single
X coordinate of the imported page area.
- y: Single
Y coordinate of the imported page area.
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.
ImportedPageArea(ImportedPageContents, Single, Single, Single)
Initializes a new instance of the ImportedPageArea class.
public ImportedPageArea(ImportedPageContents contents, float x, float y, float scale)
Public Sub New (contents As ImportedPageContents, x As Single, y As Single, scale As Single)
Parameters
- contents: ImportedPageContents
ImportedPageContents object containing the page's contents.
- x: Single
X coordinate of the imported page area.
- y: Single
Y coordinate of the imported page area.
- scale: Single
The scale to use when rendering the imported page area.
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.
ImportedPageArea(PdfPage, Single, Single)
Initializes a new instance of the ImportedPageArea class.
public ImportedPageArea(PdfPage pdfPage, float x, float y)
Public Sub New (pdfPage As PdfPage, x As Single, y As Single)
Parameters
- pdfPage: PdfPage
PdfPage object containing the page.
- x: Single
X coordinate of the imported page area.
- y: Single
Y coordinate of the imported page area.
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.
ImportedPageArea(PdfPage, Single, Single, Single)
Initializes a new instance of the ImportedPageArea class.
public ImportedPageArea(PdfPage pdfPage, float x, float y, float scale)
Public Sub New (pdfPage As PdfPage, x As Single, y As Single, scale As Single)
Parameters
- pdfPage: PdfPage
PdfPage object containing the page.
- x: Single
X coordinate of the imported page area.
- y: Single
Y coordinate of the imported page area.
- scale: Single
The scale to use when rendering the imported page area.
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.
ImportedPageArea(String, Int32, Single, Single)
Initializes a new instance of the ImportedPageArea class.
public ImportedPageArea(string filePath, int pageNumber, float x, float y)
Public Sub New (filePath As String, pageNumber As Integer, x As Single, y As Single)
Parameters
- filePath: String
Physical file path of the PDF doument to import.
- pageNumber: Int32
Page number to import.
- x: Single
X coordinate of the imported page area.
- y: Single
Y coordinate of the imported page area.
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.
ImportedPageArea(String, Int32, Single, Single, Single)
Initializes a new instance of the ImportedPageArea class.
public ImportedPageArea(string filePath, int pageNumber, float x, float y, float scale)
Public Sub New (filePath As String, pageNumber As Integer, x As Single, y As Single, scale As Single)
Parameters
- filePath: String
Physical file path of the PDF document to import.
- pageNumber: Int32
Page number to import.
- x: Single
X coordinate of the imported page area.
- y: Single
Y coordinate of the imported page area.
- scale: Single
The scale to use when rendering the imported page area.
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
Angle
Gets or sets the angle of the imported page area in degrees.
public float Angle { get; set; }
Public Property Angle As Single
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.
Contents
Get the imported page area's ImportedPageContents object.
public ImportedPageContents Contents { get; }
Public Property Contents As ImportedPageContents
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.
Height
Gets or sets the height of the imported page area.
public float Height { get; set; }
Public Property Height As Single
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.
ID
Gets or sets the ID of the page element. (Inherited from PageElement)
public string ID { get; set; }
Public Property ID As String
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.
IgnoreMargins
Gets or sets ignore margin property. Setting false will consider the margin while placing the page element based on the RelativeTo property. (Inherited from PageElement)
public bool IgnoreMargins { get; set; }
Public Property IgnoreMargins 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.
Examples
The following example will place the Label in the top-left of the page with IgnoreMargin
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); // Create an Label and place it in page top left with margin ignored
Label label = new Label("I am placed in Page top left with margin ignored", 0, 0, 160, 30);
label.RelativeTo = RelativeTo.TopLeft;
label.IgnoreMargin=true; page.Elements.Add(label);
// Save the PDF
document.Draw(outputPath);
}
}
RelativeTo
Gets and sets placement of the page element on the page. (Inherited from PageElement)
public RelativeTo RelativeTo { get; set; }
Public Property RelativeTo As RelativeTo
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.
Examples
The following example will place the Label in the top-left of the page.
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); // Create an Label and place it in page top left with margin
Label label = new Label("I am placed in Page top left with margin.", 0, 0, 160, 30);
label.RelativeTo = RelativeTo.TopLeft;
page.Elements.Add(label);
// Save the PDF
document.Draw(outputPath);
}
}
ScaleX
Gets or sets the horizontal scale of the imported page area.
public float ScaleX { get; set; }
Public Property ScaleX As Single
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.
ScaleY
Gets or sets the vertical scale of the imported page area.
public float ScaleY { get; set; }
Public Property ScaleY As Single
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.
Width
Gets or sets the width of the imported page area.
public float Width { get; set; }
Public Property Width As Single
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.
X
Gets or sets the X coordinate of the page element.
public float X { get; set; }
Public Property X As Single
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.
Y
Gets or sets the Y coordinate of the imported page area.
public float Y { get; set; }
Public Property Y As Single
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
Draw(PageWriter)
Draws the image to the given PageWriter object.
public void Draw(PageWriter writer)
Sub Draw(writer As PageWriter)
Parameters
- writer: PageWriter
PageWriter object to receive the image's output.
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.
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.
SetBounds(Single, Single)
Scales the image to fit in the given box keeping the X and Y scale equal.
public void SetBounds(float maximumWidth, float maximumHeight)
Sub SetBounds(maximumWidth As Single, maximumHeight As Single)
Parameters
- maximumWidth: Single
The maximum width.
- maximumHeight: Single
The maximum height.
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.
SetSize(Single, Single)
Scales the image to fit the exact width and height given.
public void SetSize(float width, float height)
Sub SetSize(width As Single, height As Single)
Parameters
- width: Single
Width of image.
- height: Single
Height of image.
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.