GroupDocs.Comparison at a glance

API to compare various types of documents such as PDF, Microsoft Office, HTML, e-mails, or images within Node.js applications

Illustration comparison

Detailed output reports

GroupDocs.Comparison identifies changes in document content (characters, words, paragraphs, tables, charts), as well as, changes in document style. It provides customers with a resulting report that contains rich information about differences, their number, and type.

Most popular file and document formats are supported

With GroupDocs.Comparison API you can efficiently compare documents of any supported formats like PDF, HTML, e-mail, Microsoft Office Word documents, Excel spreadsheets, PowerPoint presentations, OneNote, Visio diagrams, texts, JPEG, PNG, GIF, and BMP images as well as many other formats.

Documentation and examples

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 API in your Node.js application.

Select changes and merge them to one file

If you have different versions of one document it is possible to select only desired changes and compile new document using the GroupDocs.Comparison library.

Platform independence

GroupDocs.Comparison for Node.js via Java supports the following operating systems, frameworks and package managers

Windows
macOS
Linux
NPM
NuGet
Amazon
Docker
Azure
VS Code
Eclipse
IntelliJ

Supported file formats

GroupDocs.Comparison for Node.js via Java supports operations with the following file formats.

Microsoft Office & OpenDocument formats

  • Word: DOCX, DOC, DOCM,DOT, DOTM, DOTX, RTX, RTF, TXT
  • Excel: XLSX, XLS, XLT, XLTM, XLSB, XLSM
  • PowerPoint: PPTX, PPT, POT, POTX, PPS, PPSX
  • Outlook: EML, EMLX, MSG
  • OneNote: ONE
  • OpenDocument: ODT, ODP, OTP, ODS, OTT
  • Fixed Page Layout: PDF

Images, Graphics & Diagrams

  • Raster images: BMP, GIF, JPG, JPEG, PNG
  • Medical Imaging: DICOM
  • Microsoft Visio: VSDX, VSD, VSS, VST, VDX
  • AutoCAD Drawing: DWG, DXF

Other

  • Text: TXT
  • Programming Languages: CS, Java, CPP, JS, PY, RB, PL, ASM, GROOVY, JSON, PHP, SQL, LOG, DIFF, LESS, SCALA
  • Web: HTM, HTML, MHT, MHTML
  • e-Books: MOBI, DjVu
  • Delimiter-Separated Values: CSV

GroupDocs.Comparison for Node.js via Java features

Easily compare PDF and Office documents, images and other formats

Feature icon

Easy to use document comparison

Analyze and identify differences within two documents.

Feature icon

Compare multiple documents

Analyze and identify differences within multiple documents simultaneously.

Feature icon

Supported formats

Supports more than 50 popular document formats from various categories.

Feature icon

Accept or reject changes

Clear visual representation of identified changes, providing the option to accept or reject modifications.

Feature icon

Generate previews

Save the results of the comparison as images.

Feature icon

Content comparison

Compare text content line-by-line, by paragraphs, by words, by characters. Highlight the changes.

Feature icon

Style comparison

Detect changes in formatting and styles.

Feature icon

Set metadata

Keep metadata from either the source or target files or allow it to be specified by users.

Feature icon

Password protection

Analyze the encrypted documents, or secure the resulting document with a password.

Feature icon

Compare specific pages

Load just the particular sections or pages of the document.

Feature icon

Display comments

When loading the source document you can choose whether to hide or show comments.

Code samples

Some use cases of typical GroupDocs.Comparison for Node.js via Java operations

Comparing password-protected documents.

To compare documents that are protected with a password, you need to specify it then loading the documents:

How to compare password-protected documents.


import { Comparer, LoadOptions } from '@groupdocs/groupdocs.comparison'

// Load the source document and specify its password
const comparer = new Comparer("source.docx", new LoadOptions("1234"));

// Load the target document and specify its password
comparer.add("target.docx", new LoadOptions("5678"));

// Save comparison result to a specified file
comparer.compare("result.docx");

Comparing multiple PDF documents.

GroupDocs.Comparison allows you to compare more than two documents. The operation is almost the same as when comparing two files. You just need to add more target files to the comparer class.

How to compare three or more documents.

import { Comparer } from '@groupdocs/groupdocs.comparison'

// Load the source document
const comparer = new Comparer(source.pdf");

// Specify the second file for comparison
comparer.add("target2.pdf");

// Specify the third file for comparison
comparer.add("target3.pdf");

// Save comparison result to a specified file
comparer.compare("result.pdf");
 English