Aspose.Words does not mimic Microsoft Word's Compare feature

Hi,

Aspose.Words for Java (tested v15.12.0.0) does not mimic Microsoft Word’s Compare feature, see attached image.

Word: 2 insertions. (two paragraphs, just as expected)

Aspose: 7 insertions & 1 deletion & 6 formattings.

The following code was used to create the files:

DocumentBuilder v1 = new DocumentBuilder();
v1.getDocument().getStyles().getByStyleIdentifier(StyleIdentifier.HEADING_1).getFont().setColor(Color.GRAY);
v1.getParagraphFormat().setStyleIdentifier(StyleIdentifier.HEADING_1);
v1.write("Technical");
v1.getDocument().save("v1.rtf");

DocumentBuilder v2 = new DocumentBuilder();
v2.getFont().setColor(Color.GREEN);
v2.writeln("This is");
v2.getFont().clearFormatting();
v2.getFont().setUnderline(Underline.SINGLE);
v2.getFont().setColor(Color.GREEN);
v2.writeln("Underlined");
v2.getFont().clearFormatting();
v2.getFont().setSuperscript(true);
v2.getFont().setColor(Color.GREEN);
v2.writeln("superscript");
v2.getFont().clearFormatting();
v2.getFont().setSubscript(true);
v2.getFont().setColor(Color.GREEN);
v2.writeln("hello");
v2.getFont().clearFormatting();
v2.getFont().setStrikeThrough(true);
v2.getFont().setColor(Color.GREEN);
v2.writeln("change");
v2.getFont().clearFormatting();
v2.getFont().setItalic(true);
v2.getFont().setColor(Color.GREEN);
v2.writeln("italic");
v2.getFont().clearFormatting();
v2.getDocument().getStyles().getByStyleIdentifier(StyleIdentifier.HEADING_1).getFont().setColor(Color.GRAY);
v2.getParagraphFormat().setStyleIdentifier(StyleIdentifier.HEADING_1);
v2.writeln("Technical");
v2.getDocument().save("v2.rtf");

v1.getDocument().compare(v2.getDocument(), "author", new Date());
v1.getDocument().save("diffAspose.rtf");

Thanks

Romain

Hi Romain,

Thanks for your inquiry. We have tested the scenario and have managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as WORDSNET-13110. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

The issues you have found earlier (filed as WORDSNET-13110) have been fixed in this Aspose.Words for .NET 16.10.0 update and this Aspose.Words for Java 16.10.0 update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.