There might be the case when source or target document is not physically located on the disk. Instead, you have the document in the form of a stream. In this case, to avoid the overhead of saving stream as a file on disk, GroupDocs.Merger provides a way to work with document streams directly. The following are the steps to be followed:
Obtain document stream;
Pass opened source document stream to Merger class constructor.
Following code snippet describes this case.
using(Streamstream=File.OpenRead(@"c:\sample.docx")){using(Mergermerger=newMerger(stream)){Console.WriteLine($"Document loaded from stream successfully.");}}
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.