PdfDocumentProcessor.AppendDocument(Stream) Method
Appends a PDF document located at the specified file stream to the end of the current document starting from the new page.
Namespace: DevExpress.Pdf
Assembly: DevExpress.Docs.v19.1.dll
Declaration
Parameters
Name | Type | Description |
---|---|---|
stream | Stream | A Stream 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.
Note
A complete sample project is available at https://github.com/DevExpress-Examples/how-to-merge-documents-into-a-single-pdf-t114298
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");
}
}
}
}
See Also