Hi Sanaz,
Thanks for your inquiry. Please read overloaded Document.Save methods. You can save the document to memory stream and use it according to your requirements.
You may also save the document to fixed page file format and display the output in browser without saving output document to disk. Please check following code example. Hope this helps you. We will update the code of DocumentComparision application at Github.
Document doc = new Document(MyDir + "in.docx");
HtmlFixedSaveOptions options = new HtmlFixedSaveOptions();
options.ExportEmbeddedImages = true;
options.ExportEmbeddedCss = true;
options.ExportEmbeddedFonts = true;
options.ExportEmbeddedSvg = true;
// Send the document in HtmlFixed format and open inside the current browser.
doc.Save(Response, "output.html", ContentDisposition.Inline, options);