Get extended information on the summary page
Leave feedback
On this page
GroupDocs.Comparison allows you to detect changes between source and target files and display changes on the separate page - SummaryPage.
You can also get extended information about the comparison of documents, which is displayed in the SummaryPage.
The following code snippet shows how to get extended information:
'use strict';// Import the GroupDocs Comparison Node.js SDK
constgroupdocs=require('@groupdocs/groupdocs.comparison');// Define file paths for source, target and output documents
constsourcePath='sample-files/source.docx';consttargetPath='sample-files/target.docx';constoutputPath='result.docx';// Initialize the comparer with the source document
constcomparer=newgroupdocs.Comparer(sourcePath);// Add the target document to the comparison set
comparer.add(targetPath);// Create comparison options
constoptions=newgroupdocs.CompareOptions();// Enable generation of an extended summary page in the result
options.setExtendedSummaryPage(true);// Execute the comparison and save the result to the specified output path
constresultPath=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 enables extended summary page generation by setting setExtendedSummaryPage(true), then performs the comparison. The result document will include an extended summary page with detailed information about all detected changes, providing more comprehensive statistics than a standard summary page.
The result is as follows:
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.
On this page
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.