ImportedPage
Represents an imported page.
public class ImportedPage : Page
Public Class ImportedPage
Inherits Page
Inheritance: ObjectPageImportedPage
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
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;
public class Example
{
public static void CreatePDF(string outputPath, string inputPath, int pageNumber, float Margins)
{
// Create a PDF Document
Document document = new Document();
// Create an ImportedPage and add it to the document
ImportedPage page = new ImportedPage(inputPath, pageNumber, Margins);
document.Pages.Add(page);
// Save the PDF
document.Draw(outputPath);
}
}
Remarks
This class can be used to pull a single selected page from an existing PDF document.
Constructors
ImportedPage(Byte[], Int32, Single?) | Initializes a new instance of the ImportedPage class. |
ImportedPage(PdfPage) | Initializes a new instance of the ImportedPage class. |
ImportedPage(PdfPage, Single) | Initializes a new instance of the ImportedPage class. |
ImportedPage(String, Int32) | Initializes a new instance of the ImportedPage class. |
ImportedPage(String, Int32, Single) | Initializes a new instance of the ImportedPage class. |
Properties
ApplyDocumentTemplate | Gets or sets a value indicating if this page uses the documents template. (Inherited from Page) |
ApplySectionTemplate | Gets or sets a value indicating if this page uses the sections template. (Inherited from Page) |
BackgroundElements | Gets a collection of page elements to be drawn as a background on the page. |
Dimensions | Gets or sets the dimensions of the page. (Inherited from Page) |
Elements | Gets a collection of page elements. (Inherited from Page) |
ImportAllOtherData | Gets or sets a value specifying whether or not to import all data except annotations and form fields. |
ImportAnnotations | Gets or sets a value specifying whether or not to import the annotations. |
ImportFormFields | Gets or sets a value specifying whether or not to import the form fields. |
LogicalStructure | Gets or sets a value specifying whether or not to import the logical structures. |
ReaderEvents | Gets the reader events of the page. (Inherited from Page) |
Rotate | Gets or sets the rotation of the page. (Inherited from Page) |
TabOrder | Gets or Sets the tab order for the page. (Inherited from Page) |
UnderlyingElements | Gets a collection of page elements that will appear beneath (behind) the page elements from the Elements property. (Inherited from Page) |
Methods
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) |