officefileapi-devexpress-dot-pdf-dot-pdfdocumentprocessor-dot-appenddocument-x28-system-dot-io-dot-stream-x29.md
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.v25.2.dll
NuGet Package : DevExpress.Document.Processor
public void AppendDocument(
Stream stream
)
Public Sub AppendDocument(
stream As Stream
)
| Name | Type | Description |
|---|---|---|
| stream | Stream |
A Stream value, specifying the location of the appended document.
|
All additional content (interactive forms, bookmarks,hyperlinks, file attachments, etc.) of the appended document is copied to the resulting file.
using (PdfDocumentProcessor pdfDocumentProcessor = new PdfDocumentProcessor()) {
pdfDocumentProcessor.CreateEmptyDocument("..\\..\\docs\\Merged.pdf");
pdfDocumentProcessor.AppendDocument( new FileStream("..\\..\\docs\\TextMerge1.pdf",
FileMode.OpenOrCreate));
}
Using pdfDocumentProcessor As New PdfDocumentProcessor()
pdfDocumentProcessor.CreateEmptyDocument("..\..\docs\Merged.pdf")
pdfDocumentProcessor.AppendDocument(New FileStream("..\..\docs\TextMerge1.pdf", FileMode.OpenOrCreate))
End Using
The following code snippets (auto-collected from DevExpress Examples) contain references to the AppendDocument(Stream) 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.
exporter.ExportDashboardItemToPdf(dashboardId, dashboardItemName, stream, new System.Drawing.Size(1024, 768), dashboardState);
documentProcessor.AppendDocument(stream);
}
exporter.ExportToPdf("Dashboard", stream, new System.Drawing.Size(1024, 768), dashboardState, pdfOptions);
documentProcessor.AppendDocument(stream);
}
office-file-api-in-web-api-app/CS/Controllers/PdfController.cs#L23
stream.Seek(0, SeekOrigin.Begin);
processor.AppendDocument(stream);
}
exporter.ExportToPdf("Dashboard1", stream, New System.Drawing.Size(1024, 768), dashboardState, pdfOptions)
documentProcessor.AppendDocument(stream)
End Using
See Also