If so you can download any of the below versions for testing. The product will function as normal except for an evaluation limitation. At the time of purchase we provide a license file via email that will allow the product to work in its full capacity. If you would also like an evaluation license to test without any restrictions for 30 days, please follow the directions provided here.
If you experience errors, when you try to download a file, make sure your network policies (enforced by your company or ISP) allow downloading ZIP and/or MSI files.

Instalação
O pacote está disponível em npmjs.com e pode ser instalado via npm executando o seguinte comando:
npm install groupdocs-comparison-cloud

Requisitos
Dependências
O SDK requer os seguintes pacotes:
| Package | Constraint |
|---|
| axios | ^1.16.1 |
| form-data | * |
| jsonwebtoken | 9.0.1 |
| qs | 6.15.2 |
Início rápido
Obtenha suas credenciais de API
Para usar o GroupDocs.Comparison Cloud, cadastre-se no GroupDocs.Cloud Dashboard e obtenha seu Client ID e Client Secret.
Inicialize a API
Use o código a seguir para começar a usar o GroupDocs.Comparison Cloud SDK for Node.js.
"use strict";
const comparison_cloud = require("groupdocs-comparison-cloud");
const clientId = "YourClientId";
const clientSecret = "YourClientSecret";
const config = new comparison_cloud.Configuration(clientId, clientSecret);
config.apiBaseUrl = "https://api.groupdocs.cloud";
const compareApi = comparison_cloud.CompareApi.fromConfig(config);
Veja o exemplo completo em RunExamples.js.
Comparar dois documentos
Depois de inicializada, use este exemplo básico para comparar dois documentos do Word e salvar o resultado.
"use strict";
const comparison_cloud = require("groupdocs-comparison-cloud");
const clientId = "YourClientId";
const clientSecret = "YourClientSecret";
const config = new comparison_cloud.Configuration(clientId, clientSecret);
config.apiBaseUrl = "https://api.groupdocs.cloud";
const compareApi = comparison_cloud.CompareApi.fromConfig(config);
(async () => {
let source = new comparison_cloud.FileInfo();
source.filePath = "source_files/word/source.docx";
let target = new comparison_cloud.FileInfo();
target.filePath = "target_files/word/target.docx";
let options = new comparison_cloud.ComparisonOptions();
options.sourceFile = source;
options.targetFiles = [target];
options.outputPath = "output/result.docx";
let request = new comparison_cloud.ComparisonsRequest(options);
let response = await compareApi.comparisons(request);
console.log("Output file link: " + response.href);
})();
Veja o exemplo completo em CompareDocuments.js.
Obter a lista de alterações
Este exemplo retorna as alterações entre dois documentos do Word.
"use strict";
const comparison_cloud = require("groupdocs-comparison-cloud");
const clientId = "YourClientId";
const clientSecret = "YourClientSecret";
const config = new comparison_cloud.Configuration(clientId, clientSecret);
config.apiBaseUrl = "https://api.groupdocs.cloud";
const compareApi = comparison_cloud.CompareApi.fromConfig(config);
(async () => {
let source = new comparison_cloud.FileInfo();
source.filePath = "source_files/word/source.docx";
let target = new comparison_cloud.FileInfo();
target.filePath = "target_files/word/target.docx";
let options = new comparison_cloud.ComparisonOptions();
options.sourceFile = source;
options.targetFiles = [target];
options.outputPath = "output/result.docx";
let request = new comparison_cloud.PostChangesRequest(options);
let changes = await compareApi.postChanges(request);
console.log("Changes count: " + changes.length);
})();
Veja o exemplo completo em GetListOfChanges.js.
Este exemplo retorna a contagem de páginas de um documento de origem.
"use strict";
const comparison_cloud = require("groupdocs-comparison-cloud");
const clientId = "YourClientId";
const clientSecret = "YourClientSecret";
const config = new comparison_cloud.Configuration(clientId, clientSecret);
config.apiBaseUrl = "https://api.groupdocs.cloud";
const infoApi = comparison_cloud.InfoApi.fromConfig(config);
(async () => {
let fileInfo = new comparison_cloud.FileInfo();
fileInfo.filePath = "source_files/word/source.docx";
let request = new comparison_cloud.GetDocumentInfoRequest(fileInfo);
let response = await infoApi.getDocumentInfo(request);
console.log("GetDocumentInformation completed: " + response.pageCount);
})();
Veja o exemplo completo em GetDocumentInformation.js.
Recupere os formatos de documento que a API pode comparar.
"use strict";
const comparison_cloud = require("groupdocs-comparison-cloud");
const clientId = "YourClientId";
const clientSecret = "YourClientSecret";
const config = new comparison_cloud.Configuration(clientId, clientSecret);
config.apiBaseUrl = "https://api.groupdocs.cloud";
const infoApi = comparison_cloud.InfoApi.fromConfig(config);
(async () => {
let response = await infoApi.getSupportedFileFormats();
console.log("Formats count: " + response.formats.length);
})();
Veja o exemplo completo em GetSupportedFormats.js.
Exemplos no GitHub
O repositório GroupDocs.Comparison Cloud Node.js Examples inclui exemplos prontos para executar que abrangem:
| Category | Examples |
|---|
| Basic Usage | Comparar documentos, comparar documentos PDF, informações do documento, formatos compatíveis, visualização, consumo de licença |
| Advanced Usage | Vários documentos, documentos protegidos, sensibilidade, estilos de alteração, lista de alterações, revisões, opções de salvamento |
Como executar os exemplos
- Clone ou baixe o repositório de exemplos
- Edite
Examples/RunExamples.js e defina clientId e clientSecret - Vá para o diretório
Examples - Execute
npm install - Execute
npm update - Execute
npm run-script start
Para mais detalhes, visite Getting Started.

Document Comparison API | Node.js Cloud API | GroupDocs.Comparison Cloud | REST API | Document Comparison | Folder Comparison | Revision Control | Track Changes | Preview Generation | Multi-format Support | Password Protected Documents | Source Code Comparison | Change Tracking | Customization | Document Merging | Change Coordinates | Metadata Extraction | Document Security | Document Review | Secure API Access | Cloud Storage Integration | Cross-platform API