Page 1 of 1

Is it possible to open document and Compare Last Version?

PostPosted: Fri Aug 08, 2014 5:14 am
by cjfennim
I am new to docx4j but I have spent a lot of time searching through the documentation and forums and have not been able to find out if this is even possible. In Word 2007, you can click on Review tab and then Compare and select Latest Version and you will see the tracked changes with special mark-up and then you can Save As to a new file that will show the tracked changes. I wanted to know if it is possible to use docx4j to do that same process in an automated manner? For example, we have users that do not have Word but need to see the tracked changes to a Word document that is stored online. I want to be able to select one or more documents and have them "converted" so they show the tracked changes, perhaps saved as a PDF. Any help would be appreciated.

Re: Is it possible to open document and Compare Last Version

PostPosted: Fri Aug 08, 2014 10:40 am
by jason
See https://github.com/plutext/docx4j/blob/ ... ments.java
and https://github.com/plutext/docx4j/blob/ ... river.java as a starting point.

Please note that the diff functionality as it stands can be a bit temperamental, and so is more suited to advanced devs (ie experienced with XML, OpenXML, docx4j) and a somewhat predictable set of document content. You'll need to be prepared to invest some time/effort to get the results you are looking for, with limited support.