Use GroupDocs.Comparison to compare MS Word documents
- Install our solution from Maven
- Comparer must be created with first DOCX document as a parameter
- Any comparison needs more than one DOCX document
- Resulting report provides useful data
Use GroupDocs.Comparison to compare MS Word documents
// Check files from your hard drive for differences or similarities
// Create a Comparer object by specifying the initial file
try (Comparer comparer = new Comparer("main.docx")
{
// Include additional files to comparing
comparer.add("version1.docx");
comparer.add("version2.docx");
comparer.add("version3.docx");
// Get the report with the specified name as the result
final Path resultPath = comparer.compare("full_report.docx");
System.out.println("\nDocuments compared successfully.");
}
<dependencies>
<dependency>
<groupId>com.groupdocs</groupId>
<artifactId>groupdocs-comparison</artifactId>
<version>24.8</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>repository.groupdocs.com</id>
<name>GroupDocs Repository</name>
<url>https://repository.groupdocs.com/repo/</url>
</repository>
</repositories>
Download GroupDocs.Comparison for free or get a trial license for full access!
GroupDocs.Comparison Java API allows users to control DOCX documents versions via precise and detailed reports which may be easily processed.