ImportedPageData

Represents a Page Element containing the data of an imported page from a PDF document.

public class ImportedPageData : PageElement, ISerializable
Public Class ImportedPageData
    Inherits PageElement
    Implements ISerializable

Inheritance: ObjectPageElementImportedPageData

Implements: ISerializable

Licensing Info

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

Examples

This example shows you how to import one page of an existing PDF, scale that page and then place it on another blank page.
Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.Merger
     
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)
     
        ' Create an ImportedPage and add it to the document
        Dim MyData As ImportedPageData = New ImportedPageData("C:\ImportPDF.pdf", 2, -200, -100, 0.24F )
        MyPage.Elements.Add(MyData)
     
        ' Save the PDF
        MyDocument.Draw("C:\MyDocument.pdf")
     
    End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.Merger;

public class Example
{
    public static void CreatePDF(string outputPath, string inputFilePath)
    {
        // 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 ImportedPageData and add it to the page
        ImportedPageData data = new ImportedPageData(inputFilePath, 2, -200, -100, 0.24f);
        page.Elements.Add(data);

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

Remarks

This class can be used to pull a single selected page from an existing PDF document. You can scale it or rotate it and you can place it on an another page.

Constructors

ImportedPageData(Byte[], Int32, [Optional] Single, [Optional] Single, [Optional] Single)Initializes a new instance of the ImportedPageData class.
ImportedPageData(ImportedPageContents)Initializes a new instance of the ImportedPageData class.
ImportedPageData(ImportedPageContents, Single, Single)Initializes a new instance of the ImportedPageData class.
ImportedPageData(ImportedPageContents, Single, Single, Single)Initializes a new instance of the ImportedPageData class.
ImportedPageData(PdfPage)Initializes a new instance of the ImportedPageData class.
ImportedPageData(PdfPage, Single, Single)Initializes a new instance of the ImportedPageData class.
ImportedPageData(PdfPage, Single, Single, Single)Initializes a new instance of the ImportedPageData class.
ImportedPageData(String, Int32)Initializes a new instance of the ImportedPageData class.
ImportedPageData(String, Int32, Single, Single)Initializes a new instance of the ImportedPageData class.
ImportedPageData(String, Int32, Single, Single, Single)Initializes a new instance of the ImportedPageData class.

Properties

AngleGets or sets the angle of the page in degrees.
ContentsGet the imported page data's ImportedPageContents object.
HeightGets or sets the height of the page.
IDGets or sets the ID of the page element.
(Inherited from PageElement)
IgnoreMarginsGets or sets ignore margin property. Setting false will consider the margin while placing the page element based on the RelativeTo property.
(Inherited from PageElement)
RelativeToGets and sets placement of the page element on the page.
(Inherited from PageElement)
ScaleXGets or sets the horizontal scale of the page.
ScaleYGets or sets the vertical scale of the page.
WidthGets or sets the width of the page.
XOffsetGets or sets the X offset of the page.
YOffsetGets or sets the Y offset of the page.

Methods

Draw(PageWriter)Draws the imported page data to the given PageWriter object.
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.Merger

In this topic