Hi,
I want merge two rtf documents into one rtf document. I have seen following piece of code that merges two doc documents. Do I need to use same method to merge rtf documents by passing rtf documents in the AppendDocument method?
string dataDir = RunExamples.GetDataDir_QuickStart();
string fileName = "TestFile.Destination.doc";
// Load the destination and source documents from disk.
Document dstDoc = new Document(dataDir + fileName);
Document srcDoc = new Document(dataDir + "TestFile.Source.doc");
// Append the source document to the destination document while keeping the original formatting of the source document.
dstDoc.AppendDocument(srcDoc, ImportFormatMode.KeepSourceFormatting);
dataDir = dataDir + RunExamples.GetOutputFilePath(fileName);
dstDoc.Save(dataDir);
Console.WriteLine("\nDocument appended successfully.\nFile saved at " + dataDir);
By using the above code, I am seeing that merging two doc documents of size 2 MB and 5 MB resulted in merged document of around 19 MB.
By using the above code and passing rtf documents, merging two rtf documents of size 160 KB and 178 KB resulted in merged document of around 4 MB.
Also, If I want to load from stream instead of document and then merge those streams, Is there any method in aspose.word that supports this functionality?