Show Revisions

View as MarkdownMarkdown

Set up your AI agent

Give your coding agent live access to the GroupDocs documentation and API reference through the GroupDocs Docs MCP server — no install, no API key. Learn more

claude mcp add --transport http groupdocs-docs https://docs.groupdocs.com/mcp

Also process documents locally

The GroupDocs.Comparison MCP server lets your agent work with files on your machine; they are never uploaded. It needs the .NET 10 SDK or Docker.

claude mcp add groupdocs-comparison -- dnx GroupDocs.Comparison.Mcp --yes
Folders, licensing and more →

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