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

NPM Version NPM Downloads NPM-GroupDocsCloud


Anforderungen

Abhängigkeiten

Das SDK benötigt die folgenden Pakete:

PackageConstraint
axios1.8.4
form-data*
jsonwebtoken9.0.1
qs6.11.2

Schnellstart

API-Anmeldeinformationen erhalten

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

"use strict";
const annotation_cloud = require("groupdocs-annotation-cloud");

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

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

const annotateApi = annotation_cloud.AnnotateApi.fromConfig(config);

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

Textfeldanmerkung hinzufügen

Nach der Initialisierung fügen Sie mit diesem grundlegenden Beispiel eine Textfeldanmerkung zu einem Word-Dokument hinzu.

"use strict";
const annotation_cloud = require("groupdocs-annotation-cloud");

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

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

const annotateApi = annotation_cloud.AnnotateApi.fromConfig(config);

(async () => {
    let a1 = new annotation_cloud.AnnotationInfo();
    a1.annotationPosition = new annotation_cloud.Point();
    a1.annotationPosition.x = 1;
    a1.annotationPosition.y = 1;
    a1.box = new annotation_cloud.Rectangle();
    a1.box.x = 100;
    a1.box.y = 100;
    a1.box.width = 200;
    a1.box.height = 100;
    a1.pageNumber = 0;
    a1.fontColor = 65535;
    a1.fontSize = 12;
    a1.type = annotation_cloud.AnnotationInfo.TypeEnum.TextField;
    a1.text = "Text field text";
    a1.creatorName = "Anonym A.";

    let fileInfo = new annotation_cloud.FileInfo();
    fileInfo.filePath = "annotationdocs\\one-page.docx";
    let options = new annotation_cloud.AnnotateOptions();
    options.fileInfo = fileInfo;
    options.annotations = [a1];
    options.outputPath = "Output/output.docx";
    let result = await annotateApi.annotate(new annotation_cloud.AnnotateRequest(options));
    console.log("AddTextFieldAnnotation: Text Field Annotation added: " + result.href);
})();

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

Bereichsanmerkung hinzufügen

Dieses Beispiel fügt einem Word-Dokument eine Bereichsanmerkung hinzu.

"use strict";
const annotation_cloud = require("groupdocs-annotation-cloud");

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

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

const annotateApi = annotation_cloud.AnnotateApi.fromConfig(config);

(async () => {
    let a1 = new annotation_cloud.AnnotationInfo();
    a1.annotationPosition = new annotation_cloud.Point();
    a1.annotationPosition.x = 1;
    a1.annotationPosition.y = 1;
    a1.box = new annotation_cloud.Rectangle();
    a1.box.x = 100;
    a1.box.y = 100;
    a1.box.width = 200;
    a1.box.height = 100;
    a1.pageNumber = 0;
    a1.penColor = 1201033;
    a1.penStyle = annotation_cloud.AnnotationInfo.PenStyleEnum.Solid;
    a1.penWidth = 1;
    a1.type = annotation_cloud.AnnotationInfo.TypeEnum.Area;
    a1.text = "This is area annotation";
    a1.creatorName = "Anonym A.";

    let fileInfo = new annotation_cloud.FileInfo();
    fileInfo.filePath = "annotationdocs\\one-page.docx";
    let options = new annotation_cloud.AnnotateOptions();
    options.fileInfo = fileInfo;
    options.annotations = [a1];
    options.outputPath = "Output/output.docx";
    let result = await annotateApi.annotate(new annotation_cloud.AnnotateRequest(options));
    console.log("AddAreaAnnotation: Area Annotation added: " + result.href);
})();

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

Anmerkungen extrahieren

Dieses Beispiel gibt die in einem Dokument gespeicherten Anmerkungen zurück.

"use strict";
const annotation_cloud = require("groupdocs-annotation-cloud");

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

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

const annotateApi = annotation_cloud.AnnotateApi.fromConfig(config);

(async () => {
    let fileInfo = new annotation_cloud.FileInfo();
    fileInfo.filePath = "input\\input.docx";
    let result = await annotateApi.extract(new annotation_cloud.ExtractRequest(fileInfo));
    console.log("GetAnnotations: annotations count = " + result.length);
})();

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

Anmerkungen entfernen

Dieses Beispiel löscht die Anmerkungen 1, 2 und 3 aus einem Dokument.

"use strict";
const annotation_cloud = require("groupdocs-annotation-cloud");

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

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

const annotateApi = annotation_cloud.AnnotateApi.fromConfig(config);

(async () => {
    let fileInfo = new annotation_cloud.FileInfo();
    fileInfo.filePath = "input\\input.docx";
    let options = new annotation_cloud.RemoveOptions();
    options.fileInfo = fileInfo;
    options.annotationIds = [1, 2, 3];
    options.outputPath = "Output/output.docx";
    let result = await annotateApi.removeAnnotations(new annotation_cloud.RemoveAnnotationsRequest(options));
    console.log("DeleteAnnotations: annotations delete: " + result.href);
})();

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

Unterstützte Anmerkungsformate abrufen

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

"use strict";
const annotation_cloud = require("groupdocs-annotation-cloud");

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

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

const infoApi = annotation_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.Annotation Cloud Node.js Examples enthält sofort ausführbare Beispiele für:

CategoryExamples
Add AnnotationTextfeld, Hervorhebung, Unterstreichung, Durchstreichung, Wellenlinie, Ersetzung, Schwärzung, Bereich, Pfeil, Abstand, Ellipse, Bild, Link, Punkt, Polylinie, Wasserzeichen
Extract and RemoveAnmerkungen extrahieren, Anmerkungen nach ID löschen
PreviewSeiten abrufen, Seiten löschen
Basic UsageDokumentinformationen, unterstützte Formate, Datei-, Ordner- und Speichervorgänge

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 Annotation API | Node.js Cloud API | GroupDocs.Annotation Cloud | REST API | Text Annotation | Area Annotation | Highlight Annotation | Remove Annotations | Extract Annotations | Document Information | Cloud Storage Integration | Secure API Access



 Deutsch