<dependency>
    <groupId>com.groupdocs</groupId>
    <artifactId>groupdocs-comparison-cloud</artifactId>
    <version>18.9</version>
</dependency>
copied!  
compile(group: 'com.groupdocs', name: 'groupdocs-comparison-cloud', version: '18.9')
copied!  
<dependency org="com.groupdocs" name="groupdocs-comparison-cloud" rev="18.9">
    <artifact name="groupdocs-comparison-cloud" ext="jar"/>
</dependency>
copied!  
libraryDependencies += "com.groupdocs" % "groupdocs-comparison-cloud" % "18.9"
copied!  

Document Comparison Java Cloud REST API

banner

Product Page | Docs | Live Demos | Swagger UI | Code Samples | Blog | Free Support | Free Trial

GroupDocs.Comparison Cloud SDK for Java helps you build cloud Document Comparison Java Apps that work without installing any 3rd party software. It is a wrapper around GroupDocs.Comparison Cloud REST APIs.

Cloud Document Comparison Features

  • Detect content difference among two cloud documents.
  • Identify cloud document changes at the following levels:
    • paragraph level
    • word level
    • character level
  • Detect formatting & styling difference among two cloud files, such as:
    • bold
    • italic
    • underline
    • strike-through
    • font type
  • The compared document sections with changes can be highlighted using color coding, such as:
    • Additions highlighted in blue
    • Modifications highlighted in green
    • Stylizations highlighted in green
    • Deletions highlighted in red
  • The colorization scheme / coding can be customized.
  • Option to accept or reject changes among compared source & target cloud documents.
  • Ability to apply or discard specific comparison changes into the resulting cloud document.
  • Fetch a summary report listing all the detected differences between compared cloud files.
  • Get a list of all document comparison supported file formats via Java REST API.
  • Fetch cloud document properties (file format, size, page count, etc.) that help in file comparison.
  • Ability to perform document comparison on password protected Word®, Excel®, & PowerPoint® files in the cloud.
  • Adjust cloud file comparison sensitivity to improve accuracy & speed.
  • Get the on-screen page coordinates within the document page previews to pin-point the occurrences of the content changes.
  • Option to compare one source file to multiple target cloud files to fetch one resultant document.
  • Ability to set metadata information and password of the resultant cloud document.
  • Keep a track of all revisions of changes in the Cloud Word® documents, accept or reject the desired revisions.

Supported Document Comparison File Formats

Microsoft Word®: DOC, DOCM, DOCX, DOT, DOTM, DOTX, RTF, TXT
OpenOffice Writer®: ODT, OTT
Microsoft Excel®: XLS, XLSB, XLSM, XLSX, XLTM, XLTX, CSV, TSV
OpenOffice Calc®: ODS, OTS
Microsoft PowerPoint®: PPT, PPTX, PPTM, PPS, PPSM, PPSX, POTX, POTM
OpenOffice Impress®: ODP, OTP
Microsoft Project®: MPP, MPT
Microsoft OneNote®: ONE
Microsoft Visio®: VDW, VDX, VSD, VSDML, VSDX, VSS, VSSM, VSSX, VST, VSTM, VSTX, VSX, VTX
Microsoft Outlook®: EML, MSG, OST, PST
Apple® Mail: EMLX
eBooks: EPUB, MOBI
Images: BMP, DJVU, DNG, GIF, ICO, JP2, JPF, JPX, J2K, J2C, JPM, JPG, JPEG, PNG, TIF, TIFF, WEBP
Vector Graphics: SVG
MicrosoftStation: DGN
AutoCAD®: DWG, DXF
Autodesk®: DWF
CAD: IFC, STL
Adobe Photoshop®: PSD
Medical Imaging: DCM
Markup: HTML, MHT, MHTML, XML
Fixed Layout: PDF, XPS, TEX
Postscript: EPS
Meta Files: CGM, EMF, WMF

Requirements

Building the API client library requires:

  1. Java 1.7+
  2. Maven

Prerequisites

To use GroupDocs.Comparison Cloud SDK for Java you need to register an account with GroupDocs Cloud and lookup/create Client ID and Client Secret at Cloud Dashboard. There is free quota available. For more details, see GroupDocs Cloud Pricing.

Install GroupDocs.Comparison-Cloud from Maven

Add GroupDocs Cloud repository to your application pom.xml

<repository>
    <id>repository.groupdocs.cloud</id>
    <name>repository.groupdocs.cloud</name>
    <url>https://repository.groupdocs.cloud/repo/</url>
</repository>

Install from source

To install the API client library to your local Maven repository, simply execute:

mvn clean install

To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:

mvn clean deploy

Refer to the OSSRH Guide for more information.

Maven users

Add this dependency to your project’s POM:

<dependency>
    <groupId>com.groupdocs</groupId>
    <artifactId>groupdocs-comparison-cloud</artifactId>
    <version>22.4</version>
    <type>pom</type>
</dependency>

Others

At first generate the JAR by executing:

mvn clean package

Then manually install the following JARs:

  • target/groupdocs-comparison-cloud-22.4.jar
  • target/lib/*.jar

Get Started

Please follow the Quick Start instructions.

Sample Java Code to list Cloud Document Comparison Changes

// For complete examples and data files, please go to https://github.com/groupdocs-comparison-cloud/groupdocs-comparison-cloud-java-samples
String MyClientSecret = ""; // Get ClientId and ClientSecret from https://dashboard.groupdocs.cloud
String MyClientId = ""; // Get ClientId and ClientSecret from https://dashboard.groupdocs.cloud

Configuration configuration = new Configuration(MyClientId, MyClientSecret);

CompareApi apiInstance = new CompareApi(configuration);

FileInfo sourceFileInfo = new FileInfo();
sourceFileInfo.setFilePath("source_files/word/source.docx");
FileInfo targetFileInfo = new FileInfo();
targetFileInfo.setFilePath("target_files/word/target.docx");

ComparisonOptions options = new ComparisonOptions();
options.setSourceFile(sourceFileInfo);
options.addTargetFilesItem(targetFileInfo);

PostChangesRequest request = new PostChangesRequest(options);
List<ChangeInfo> changes = apiInstance.postChanges(request);

Authorization & Authentication

Authentication schemes defined for the API is as follows:

JWT

Product Page | Docs | Live Demos | Swagger UI | Code Samples | Blog | Free Support | Free Trial

VersionRelease Date
22.4April 14, 2022
21.7July 16, 2021
21.3March 11, 2021
20.12December 2, 2020
20.5May 21, 2020
19.5May 21, 2019
18.9December 20, 2018
18.4September 25, 2018