Hello,
Hope you are doing well!
I am trying to compare two documents in internet explorer. The moment I click “Compare” button, comparison screen shows up with results only for a second or two and then it goes blank. I am facing this issue only on IE and Edge browser. This issue is not happening on google chrome. Please find below a piece of code that I am using to generate “difference” file and display comparison.
Document doc1 = new Document(path);
doc1.save(path+".docx", SaveFormat.DOCX);
Document doc2 = new Document(path);
doc2.save(path+".docx", SaveFormat.DOCX);
if(doc1.hasRevisions())
{
doc1.acceptAllRevisions();
}
if(doc2.hasRevisions())
{
doc2.acceptAllRevisions();
}
com.aspose.words.HtmlSaveOptions saveOptions = new com.aspose.words.HtmlSaveOptions(SaveFormat.HTML);
saveOptions.setPrettyFormat(true);
saveOptions.setExportImagesAsBase64(true);
saveOptions.setExportXhtmlTransitional(true);
saveOptions.setExportRoundtripInformation(false);
doc2.compare(doc1, “user”, new java.util.Date());
doc2.getLayoutOptions().getRevisionOptions().setInsertedTextColor(RevisionColor.BRIGHT_GREEN);
doc2.getLayoutOptions().getRevisionOptions().setDeletedTextColor(RevisionColor.RED);
doc2.save(path, saveOptions);
com.aspose.words.Document temp_doc1 = new com.aspose.words.Document(temp_path+".docx");
com.aspose.words.Document temp_doc2 = new com.aspose.words.Document(temp_path+".docx");
//save temp_doc1 and temp_doc2 in html format…
temp_doc1.save(temp_path+".htm", SaveFormat.HTML_FIXED);
temp_doc2.save(temp_path+".htm", SaveFormat.HTML_FIXED);
Note: I am using aspose-words version 19.7
I am also attaching the documents that I am trying to compare for your reference. I could not upload the .docx file as it is not accepting that format while uploading. So I have converted those files to .pdf format. I’m looking forward to hearing from you.
Regards,
Amey