Blader door onze producten

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.


Product Docs Swagger Examples Blog Support Dashboard

Installation

Das Paket ist verfügbar bei npmjs.com und kann über npm mit folgendem Befehl installiert werden:

npm install groupdocs-comparison-cloud

NPM Version NPM Downloads NPM-GroupDocsCloud


Anforderungen

Abhängigkeiten

Das SDK benötigt die folgenden Pakete:

PackageConstraint
axios^1.16.1
form-data*
jsonwebtoken9.0.1
qs6.15.2

Schnellstart

API-Anmeldeinformationen erhalten

Um GroupDocs.Comparison Cloud zu nutzen, registrieren Sie sich im GroupDocs.Cloud Dashboard und erhalten Sie Ihre Client ID und Client Secret.

API initialisieren

Verwenden Sie den folgenden Code, um das GroupDocs.Comparison Cloud SDK for Node.js zu nutzen.

"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);

Das vollständige Beispiel finden Sie in RunExamples.js.

Zwei Dokumente vergleichen

Nach der Initialisierung vergleichen Sie mit diesem grundlegenden Beispiel zwei Word-Dokumente und speichern das Ergebnis.

"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);
})();

Das vollständige Beispiel finden Sie in CompareDocuments.js.

Liste der Änderungen abrufen

Dieses Beispiel gibt die Änderungen zwischen zwei Word-Dokumenten zurück.

"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);
})();

Das vollständige Beispiel finden Sie in GetListOfChanges.js.

Dokumentinformationen abrufen

Dieses Beispiel gibt die Seitenzahl eines Quelldokuments zurück.

"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);
})();

Das vollständige Beispiel finden Sie in GetDocumentInformation.js.

Unterstützte Vergleichsformate abrufen

Rufen Sie die Dokumentformate ab, die die API vergleichen kann.

"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);
})();

Das vollständige Beispiel finden Sie in GetSupportedFormats.js.

Beispiele auf GitHub

Das Repository GroupDocs.Comparison Cloud Node.js Examples enthält sofort ausführbare Beispiele für:

CategoryExamples
Basic UsageDokumente vergleichen, PDF-Dokumente vergleichen, Dokumentinformationen, unterstützte Formate, Vorschau, Lizenzverbrauch
Advanced UsageMehrere Dokumente, geschützte Dokumente, Empfindlichkeit, Änderungsstile, Änderungsliste, Revisionen, Speicheroptionen

So führen Sie die Beispiele aus

  1. Klonen oder laden Sie das Beispiel-Repository herunter
  2. Bearbeiten Sie Examples/RunExamples.js und setzen Sie clientId und clientSecret
  3. Wechseln Sie in das Verzeichnis Examples
  4. Führen Sie npm install aus
  5. Führen Sie npm update aus
  6. Führen Sie npm run-script start aus

Weitere Details finden Sie unter Getting Started.


Product Docs Swagger Examples Blog Support Dashboard


Tags

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



 Deutsch