Skip to main content

ImportedPage

Version: 9.0

cete.dynamicpdf.merger.importedpage

ImportedPage​

Represents an imported page.

public class ImportedPage : Page
Public Class ImportedPage
Inherits Page

Inheritance: Object → Page → ImportedPage

Licensing​

This class is a DynamicPDF Merger Standard Edition feature. One of the following licenses is required for non-evaluation usage:

  • DynamicPDF Merger for .NET Standard Edition
  • DynamicPDF Merger for .NET Professional Edition
  • DynamicPDF Merger for .NET Enterprise Edition
  • DynamicPDF Core Suite for .NET Professional Edition
  • DynamicPDF Core Suite for .NET Enterprise Edition

Examples​

This example shows you how to import one page of an existing PDF and save it as a separate PDF.

Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.Merger

Module MyModule

Sub Main()

' Create a PDF Document
Dim MyDocument As Document = New Document()
' Create an ImportedPage and add it to the document
Dim MyPage As ImportedPage = New ImportedPage("C:\ImportPDF.pdf", 2, 50)
MyDocument.Pages.Add( MyPage )

' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.Merger;

class MyClass
{
static void Main()
{
// Create a PDF Document
Document document = new Document();

// Create an ImportedPage and add it to the document
ImportedPage page = new ImportedPage( @"C:\ImportPDF.pdf", 2, 50 );
document.Pages.Add( page );

// Save the PDF
document.Draw( @"C:\MyDocument.pdf" );
}
}

Remarks​

This class can be used to pull a single selected page from an existing PDF document.

Constructors​

ImportedPage(PdfPage)​

Initializes a new instance of the ImportedPage class.

public ImportedPage(PdfPage pdfPage)
Public Sub New (pdfPage As PdfPage)

Parameters​

PdfPage object to import.

ImportedPage(PdfPage, Single)​

Initializes a new instance of the ImportedPage class.

public ImportedPage(PdfPage pdfPage, float margins)
Public Sub New (pdfPage As PdfPage, margins As Single)

Parameters​

PdfPage object to import.

Margins of the new page. Overrides the default margins.

ImportedPage(String, Int32)​

Initializes a new instance of the ImportedPage class.

public ImportedPage(string filePath, int pageNumber)
Public Sub New (filePath As String, pageNumber As Integer)

Parameters​

Physical file path of the PDF document to import.

Page number to import.

ImportedPage(String, Int32, Single)​

Initializes a new instance of the ImportedPage class.

public ImportedPage(string filePath, int pageNumber, float margins)
Public Sub New (filePath As String, pageNumber As Integer, margins As Single)

Parameters​

Physical file path of the PDF document to import.

Page number to import.

Margins of the new page. Overrides the default margins.

Properties​

ApplyDocumentTemplate​

Gets or sets a value indicating if this page uses the documents template. (Inherited from Page)

public bool ApplyDocumentTemplate { get; set; }
Public Property ApplyDocumentTemplate As Boolean

Property Value​

Boolean

ApplySectionTemplate​

Gets or sets a value indicating if this page uses the sections template. (Inherited from Page)

public bool ApplySectionTemplate { get; set; }
Public Property ApplySectionTemplate As Boolean

Property Value​

Boolean

BackgroundElements​

Gets a collection of page elements to be drawn as a background on the page.

public Group BackgroundElements { get; }
Public Property BackgroundElements As Group

Property Value​

Group

Remarks​

Page elements placed in this collection will appear below the imported PDF data. Use the Elements property to place page elements on top of the imported PDF data.

Dimensions​

Gets or sets the dimensions of the page. (Inherited from Page)

public PageDimensions Dimensions { get; set; }
Public Property Dimensions As PageDimensions

Property Value​

PageDimensions

Elements​

Gets a collection of page elements. (Inherited from Page)

public Group Elements { get; }
Public Property Elements As Group

Property Value​

Group

ImportAllOtherData​

Gets or sets a value specifying whether or not to import all data except annotations and form fields.

public bool ImportAllOtherData { get; set; }
Public Property ImportAllOtherData As Boolean

Property Value​

Boolean

ImportAnnotations​

Gets or sets a value specifying whether or not to import the annotations.

public bool ImportAnnotations { get; set; }
Public Property ImportAnnotations As Boolean

Property Value​

Boolean

ImportFormFields​

Gets or sets a value specifying whether or not to import the form fields.

public bool ImportFormFields { get; set; }
Public Property ImportFormFields As Boolean

Property Value​

Boolean

LogicalStructure​

Gets or sets a value specifying whether or not to import the logical structures.

public bool LogicalStructure { get; set; }
Public Property LogicalStructure As Boolean

Property Value​

Boolean

ReaderEvents​

Gets the reader events of the page. (Inherited from Page)

public PageReaderEvents ReaderEvents { get; }
Public Property ReaderEvents As PageReaderEvents

Property Value​

PageReaderEvents

Rotate​

Gets or sets the rotation of the page. (Inherited from Page)

public int Rotate { get; set; }
Public Property Rotate As Int32

Property Value​

Int32

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​

The Object to compare with the current Object .

Returns​

true if the specified Object is equal to the current Object ; otherwise, false.

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 .

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.

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 .

See Also​

ceTe.DynamicPDF.Merger