GroupDocs.Comparison for Java is the most flexible and easy-to-use API to help you develop document comparison applications in the Java environment. The difference checker and document merge API allow you to detect changes and differences in content as well as in text style between similar document formats.
The GroupDocs.Comparison library supports detecting differences in both content and text style between popular image and document formats such as PDF, HTML, e-mail Outlook, Microsoft Office Word documents, Excel spreadsheets, PowerPoint presentations, OneNote, Visio diagrams, texts, png, gif and bmp images as well as a hundred of other formats.
Comparison can be performed to detect changes in the content of words, paragraphs, tables or charts and their styles, and will provide you with a comparison document that lists a summary of the differences, their number and type belonging. GroupDocs.Comparison for Java can easily extract basic information about the source document, compare and save simple, password-protected and encrypted documents of various formats through a file or data stream.
There is already a lot of documentation on using Comparison library on different platforms with code examples, so you don’t have to think hard about how to work with GroupDocs.Comparison for Java API in your application.
GroupDocs.Comparison for Java does not require any external software to be installed in the system. It is compatible with all versions of Java and supports popular operating systems (Windows, Linux, MacOS) capable of running Java runtime environment.
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:
try (Comparer comparer = new Comparer("D:\\source.pdf")) {
comparer.add("D:\\target.pdf");
comparer.compare("D:\\result.pdf");
}
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).
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.