See Also

PdfDocument Members  | ceTe.DynamicPDF.Merger Namespace

Requirements

Namespace: ceTe.DynamicPDF.Merger

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)

Language

Visual Basic

C#

Show All

Represents a PDF document for import.

For a list of all members of this type, see PdfDocument members.

Object Model



Inheritance Hierarchy

System.Object
   ceTe.DynamicPDF.Merger.PdfDocument

Syntax

[Visual Basic]
Public Class PdfDocument
[C#]
public class PdfDocument

Remarks

This class should be used when you will be referencing an existing PDF document more than once. Using a PDFDocument is more efficient than specifying a file path because the document will not need to be parsed again on each subsequent reference. This class is safe for multithreaded operations.

Example

The following example will first merge two entire PDF documents together, then will Append a selected page of a third PDF to the end.

[Visual Basic] 

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

Module MyModule

    Sub Main()

        ' Create two PDF document objects
        Dim pdfA As PdfDocument = New PdfDocument("C:\ImportPDF.pdf")
        ' The owner's password is required to merge encrypted PDFs
        Dim pdfB As PdfDocument = New PdfDocument("C:\EncryptedPDF.pdf", "owner")

        ' Merge the two documents
        Dim MyDocument As MergeDocument = MergeDocument.Merge(pdfA, pdfB)

        ' Append an additional document
        Dim pdfC As PdfDocument = New PdfDocument("C:\MyDocumentC.pdf")
        MyDocument.Append(pdfC, 2, 1)

        ' Save the PDF
        MyDocument.Draw("C:\MyDocument.pdf")

    End Sub
End Module

[C#] 

using System; 
using ceTe.DynamicPDF; 
using ceTe.DynamicPDF.Merger; 
 
class MyClass 

    static void Main() 
    { 
        // Create two PDF document objects 
        PdfDocument pdfA = new PdfDocument( @"C:\ImportPDF.pdf" ); 
        // The owner's password is required to merge encrypted PDFs 
        PdfDocument pdfB = new PdfDocument( @"C:\EncryptedPDF.pdf", "owner" ); 
 
        // Merge the two documents 
        MergeDocument document = MergeDocument.Merge( pdfA, pdfB ) 
 
        // Append an additional document 
        PdfDocument pdfC = new PdfDocument( @"C:\MyDocumentC.pdf" ); 
        document.Append( pdfC, 2, 1); 
 
        // Save the PDF 
        document.Draw( @"C:\MyDocument.pdf" ); 
    } 
}

Licensing

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

Requirements

Namespace: ceTe.DynamicPDF.Merger

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)

See Also

PdfDocument Members  | ceTe.DynamicPDF.Merger Namespace

 

 


© Copyright 2006, ceTe Software