Get only summary page

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 detect changes between source and target files and create the summary page only.

The following code snippet shows how to get only a summary page.

'use strict';

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

// Define file paths for source, target, and output 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 to be compared with the source
comparer.add(targetPath);

// Create comparison options and configure to show only summary page
const options = new groupdocs.CompareOptions();
options.setShowOnlySummaryPage(true); // enable summary-only view

// Execute comparison and save result to output path
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 sets setShowOnlySummaryPage(true) to generate only the summary page without the full document content. When the comparison is performed, the result document will contain only the summary page with statistics about detected changes, making it useful for quick overviews without the full document content.

The result is as follows:

On this page