Show Revisions

On this page

GroupDocs.Comparison allows you to compare and customize the visibility of revisions in the output document.

Revision is a collection of changes received when comparing documents using built-in Word tools.

By default, the visibility of revisions is enabled. The following code snippet shows how to disable the visibility of revisions:

'use strict';

// Import the GroupDocs Comparison Node.js SDK
const groupdocs = require('@groupdocs/groupdocs.comparison');

// Define file paths for source, target, and result documents
const sourcePath = 'sample-files/source.docx';
const targetPath = 'sample-files/target.docx';
const outputPath = 'result.docx';

// Initialize comparer with the source document
const comparer = new groupdocs.Comparer(sourcePath);

// Add the target document that will be compared against the source
comparer.add(targetPath);

// Set up comparison options
const options = new groupdocs.CompareOptions();

// Disable revision marks in the output document
options.setShowRevisions(false);

// Perform the comparison and write the result to the output file
comparer.compare(outputPath, options);

// Terminate the process with a success exit code
process.exit(0);

This example creates a Comparer instance with the source document, adds the target document, and creates a CompareOptions object. It disables the display of revision marks by setting setShowRevisions(false). When the comparison is performed, the result document will not show revision marks, displaying the final content directly without revision tracking indicators.

The result is as follows:

Closed stateOpen state
Disable display Revisions

On this page

Close
Loading

Analyzing your prompt, please hold on...

An error occurred while retrieving the results. Please refresh the page and try again.