Skip to main content
A newer version of this page is available. .
.NET Framework 4.5.2+

PdfDocumentProcessor.AppendDocument(String) Method

Appends a PDF document located at the specified path to the end of the current document starting from the new page.

Namespace: DevExpress.Pdf

Assembly: DevExpress.Docs.v19.1.dll

Declaration

public void AppendDocument(
    string path
)

Parameters

Name Type Description
path String

A String value, specifying the location of the appended document.

Remarks

All additional content (interactive forms, bookmarks,hyperlinks, file attachments, etc.) of the appended document is copied to the resulting file.

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

using DevExpress.Pdf;

namespace PdfMergeExample {

    class Program {
        static void Main(string[] args) {

            using (PdfDocumentProcessor pdfDocumentProcessor = new PdfDocumentProcessor()) {
                pdfDocumentProcessor.CreateEmptyDocument("..\\..\\docs\\Merged.pdf");
                pdfDocumentProcessor.AppendDocument("..\\..\\docs\\TextMerge1.pdf");
                pdfDocumentProcessor.AppendDocument("..\\..\\docs\\TextMerge2.pdf");             
            }
        }
    }
}

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the AppendDocument(String) method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also