Skip to main content
A newer version of this page is available. .

How to: Merge Documents into a Single PDF File

Important

You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use these examples in production code. Refer to the DevExpress Subscription page for pricing information.

This example illustrates how to use the PDF Document API component for merging pages of two separate PDF documents into a single PDF document.

Imports DevExpress.Pdf

Namespace PdfMergeExample

    Friend Class Program
        Shared Sub Main(ByVal args() As String)

            Using pdfDocumentProcessor As New PdfDocumentProcessor()
                pdfDocumentProcessor.CreateEmptyDocument("..\..\docs\Merged.pdf")
                pdfDocumentProcessor.AppendDocument("..\..\docs\TextMerge1.pdf")
                pdfDocumentProcessor.AppendDocument("..\..\docs\TextMerge2.pdf")
            End Using
        End Sub
    End Class
End Namespace
See Also