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-merger-cloud

NPM Version NPM Downloads NPM-GroupDocsCloud


Anforderungen

Abhängigkeiten

Das SDK benötigt die folgenden Pakete:

PackageConstraint
axios1.13.2
form-data*
qs6.11.2

Schnellstart

API-Anmeldeinformationen erhalten

Um GroupDocs.Merger 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.Merger Cloud SDK for Node.js zu nutzen.

"use strict";
const merger_cloud = require("groupdocs-merger-cloud");

const clientId = "YourClientId";
const clientSecret = "YourClientSecret";

const config = new merger_cloud.Configuration(clientId, clientSecret);
config.apiBaseUrl = "https://api.groupdocs.cloud";

const documentApi = merger_cloud.DocumentApi.fromConfig(config);

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

Mehrere Dokumente zusammenführen

Nach der Initialisierung führen Sie mit diesem grundlegenden Beispiel zwei Word-Dokumente zu einer Datei zusammen.

"use strict";
const merger_cloud = require("groupdocs-merger-cloud");

const clientId = "YourClientId";
const clientSecret = "YourClientSecret";

const config = new merger_cloud.Configuration(clientId, clientSecret);
config.apiBaseUrl = "https://api.groupdocs.cloud";

const documentApi = merger_cloud.DocumentApi.fromConfig(config);

(async () => {
    let item1 = new merger_cloud.JoinItem();
    item1.fileInfo = new merger_cloud.FileInfo();
    item1.fileInfo.filePath = "WordProcessing/four-pages.docx";

    let item2 = new merger_cloud.JoinItem();
    item2.fileInfo = new merger_cloud.FileInfo();
    item2.fileInfo.filePath = "WordProcessing/one-page.docx";

    let options = new merger_cloud.JoinOptions();
    options.joinItems = [item1, item2];
    options.outputPath = "Output/joined.docx";

    let result = await documentApi.join(new merger_cloud.JoinRequest(options));
    console.log("Output file path: " + result.path);
})();

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

Dokument in Einzelseiten aufteilen

Dieses Beispiel trennt ausgewählte Seiten aus einem Word-Dokument.

"use strict";
const merger_cloud = require("groupdocs-merger-cloud");

const clientId = "YourClientId";
const clientSecret = "YourClientSecret";

const config = new merger_cloud.Configuration(clientId, clientSecret);
config.apiBaseUrl = "https://api.groupdocs.cloud";

const documentApi = merger_cloud.DocumentApi.fromConfig(config);

(async () => {
    let options = new merger_cloud.SplitOptions();
    options.fileInfo = new merger_cloud.FileInfo();
    options.fileInfo.filePath = "WordProcessing/sample-10-pages.docx";
    options.outputPath = "Output/split-document";
    options.pages = [1, 3];
    options.mode = merger_cloud.SplitOptions.ModeEnum.Pages;

    let result = await documentApi.split(new merger_cloud.SplitRequest(options));
    console.log("Documents count: " + result.documents.length);
})();

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

Dokumentseiten drehen

Dieses Beispiel dreht die Seiten 2 und 4 einer PDF um 90 Grad.

"use strict";
const merger_cloud = require("groupdocs-merger-cloud");

const clientId = "YourClientId";
const clientSecret = "YourClientSecret";

const config = new merger_cloud.Configuration(clientId, clientSecret);
config.apiBaseUrl = "https://api.groupdocs.cloud";

const pagesApi = merger_cloud.PagesApi.fromConfig(config);

(async () => {
    let options = new merger_cloud.RotateOptions();
    options.fileInfo = new merger_cloud.FileInfo();
    options.fileInfo.filePath = "Pdf/ten-pages.pdf";
    options.outputPath = "Output/rotate-pages.pdf";
    options.pages = [2, 4];
    options.mode = merger_cloud.RotateOptions.ModeEnum.Rotate90;

    let result = await pagesApi.rotate(new merger_cloud.RotateRequest(options));
    console.log("Output file path: " + result.path);
})();

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

Unterstützte Merger-Formate abrufen

Rufen Sie die Dokumentformate ab, die die API zusammenführen kann.

"use strict";
const merger_cloud = require("groupdocs-merger-cloud");

const clientId = "YourClientId";
const clientSecret = "YourClientSecret";

const config = new merger_cloud.Configuration(clientId, clientSecret);
config.apiBaseUrl = "https://api.groupdocs.cloud";

const infoApi = merger_cloud.InfoApi.fromConfig(config);

(async () => {
    let response = await infoApi.getSupportedFileFormats();
    console.log("Supported file-formats:");
    response.formats.forEach(function (format) {
        console.log(format.fileFormat + "(" + format.extension + ")");
    });
})();

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

Beispiele auf GitHub

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

CategoryExamples
Document OperationsDokumente zusammenführen, Bilder zusammenführen, formatübergreifend zusammenführen, teilen, Seiten mischen, Vorschau, Anhang importieren
Pages OperationsAusrichtung ändern, Seiten extrahieren, verschieben, entfernen, drehen und tauschen
Security OperationsDokumentkennwort hinzufügen, prüfen, entfernen und aktualisieren
InfoDokumentinformationen, Lizenzverbrauch, unterstützte Dateitypen

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 Merging API | Node.js Cloud API | GroupDocs.Merger Cloud | REST API | Page Manipulation | Document Security | Password Protection | Cloud Storage Integration | File Operations | Folder Operations | Document Splitting | PDF Merging | Cross-format Merging | Word Document Merging | Excel File Merging | Presentation Merging | Document Reorganization | Secure API Access | Document Joining | Document Manipulation API | Merge Multiple Formats | Cross-platform API



 Deutsch