The two attached files are minimal reproductions based on real documents I received. If you examine the XML, you’ll see that one has table properties of the form
This is incorrect; in a more complex document than those attached here those properties can cause the table to appear in the wrong position. The expected result is
@icsk Thank you for reporting this problem to use. But comparing your attached documents does not produce tblPrChange on my side, but it must. I logged this issue into our defect database as WORDSNET-22947. We will let you know once it is resolved.
However, please attach your original or less simplified documents here to reproduce your issue. We will check it once again and provide you more information. Also please attach the comparison result produced on your side and the code you use for comparing documents.
My apologies! I must have uploaded an earlier version of the reproduction document or something of the sort. In any case, I’ve recreated the documents from start to be sure (unfortunately they are highly sensitive, so I can’t provide the originals).
These documents exhibit both the underlying XML issue as well as the user-facing issue I mentioned before, namely, that the table in the output document appears above the adjacent paragraph, but it appears below the paragraph in both of the original documents.
I’ve also included the diff, as I see it in on my end.
I notice that the issue is slightly different than I originally describe. Aspose states that the table changed from float-positioned at 0, 0 to float-positioned at 187, 187, but in reality the table went from not-float-positioned to float-positioned at 187, 187. Or in XML: there is a w:tblpPr inside a w:tblPrChange, but there is also a w:tblpPr with zeroes as a direct child of w:tblPr. The latter node should not exist at all.
These were generated with the smallest possible Java program I could write:
public static void main(String[] args) throws Exception {
configureAspose();
if (args.length != 3) {
throw new Exception("need exactly 3 arguments");
}
InputStream leftStream = new FileInputStream(new File(args[0]));
InputStream rightStream = new FileInputStream(new File(args[1]));
Document left = new Document(leftStream);
Document right = new Document(rightStream);
left.compare(right, "author", new Date());
OutputStream output = new FileOutputStream(new File(args[2]));
left.save(output, new OoxmlSaveOptions());
}
(where configureAspose just configures the license and font locations)
@icsk Thank you for additional information. I have managed to reproduce the problem and logged it as WORDSNET-22951 in our defect database. We will keep you informed and let you know once it is resolved.