Document Content Comparison Java API

Build Java applications having the ability to compare the content & style to find differences between similar document formats.

  Download Free Trial
Java Comparison API

GroupDocs.Comparison for Java


GroupDocs.Comparison for Java API helps develop document comparison applications in Java environment. Using this difference checker API your Java based applications will be able to detect changes and difference in content as well as text style among same format documents, presentations, spreadsheets, and various other types of files. The differences will be presented in a comprehensive comparison document. GroupDocs.Comparison for Java API allows fetching and saving simple, password protected, as well as encrypted documents via file as well as stream.

Previous Next

GroupDocs.Comparison for Java Features



Compare and Identify Changes in both Content & Text Style


Save Summarized Comparison List about Compared Documents


Compare Specific Pages of Word Documents


Merge up to 3 Microsoft Word Files to Compare with Support for “Track Changes”


Easily Spot which Changes are coming from which Document during Comparison


Support to Read Source Documents and Send Resultant Document via Streams


Detect Type of File Format while Fetching from Stream


Compare Documents Protected by Password


Save Comparison Result as Image


Compare Different File Formats as Image


Compare Watermarks in PDF Documents


Compare Documents from File or Stream and Send Result Document via Stream or File


Accept or Discard Changes after Comparison of Word, PDF or Excel Files


Compare Encrypted Documents via File or Stream


Metered Licensing Option for Comparison Operations


Highlight Text for Marked Changes when Comparing PDF, Word, Excel, PowerPoint & Note Documents


Calculate Correct Coordinates of Changes in PDF, PowerPoint Slides & Diagrams


Get Image Representation of Document Pages

Easily Compare Documents using Java API

Through GroupDocs.Comparison for Java API you can easily compare documents of supported formats to find differences among them. Following example shows, how to compare two Microsoft Word documents using Java:

Easily Compare Documents - Java

// Create instance of GroupDocs.Comparison.Comparer and call method
Comparer comparison = new Comparer();
ICompareResult result ="D://source.pdf", "D://target.pdf", new ComparisonSettings());

Specify Comparison Detail Level

GroupDocs.Comparison for Java allows you to compare documents at three levels deep. You can set comparison intensity to be low (compare text word by word with accuracy for imaging grid = 50), middle (compare text character by character with accuracy for imaging grid = 100) or high (compare text character by character with accuracy for imaging grid = 150).

Compare Text Style

Along with document content, GroupDocs.Comparison for Java API allows to compare text style as well.

Font name, size, color, style (bold, italic, underline, small caps, and hyperlinks) and if applicable, under color can also be compared to check difference among compared documents, while words and characters are being compared.

For paragraph comparison, alignment, indentation (left indent, right indent), spacing (space after, space before), first line indent and line spacing can also be compared.

Similarly, wherever applicable, other sections of a page can also be compared through GroupDocs.Comparison for Java API. The sections include, footer distance, page margins (left, right, top, and bottom), page height, page orientation, border color and line width.

Support and Learning Resources


GroupDocs.Comparison offers document automation APIs for other popular development environments as listed below: