Περιηγηθείτε στα Προϊόντα μας

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

Εγκατάσταση

Το πακέτο είναι διαθέσιμο στο npmjs.com και μπορεί να εγκατασταθεί μέσω npm εκτελώντας την παρακάτω εντολή:

npm install groupdocs-annotation-cloud

NPM Version NPM Downloads NPM-GroupDocsCloud


Απαιτήσεις

  • Node.js 4.8 ή νεότερη
  • npm
  • Διαπιστευτήρια GroupDocs Cloud — Client ID and Client Secret από τον Πίνακα ελέγχου

Εξαρτήσεις

Το SDK απαιτεί τα ακόλουθα πακέτα:

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

Γρήγορη εκκίνηση

Λάβετε τα διαπιστευτήρια API

Για να χρησιμοποιήσετε το GroupDocs.Annotation Cloud, εγγραφείτε στον GroupDocs.Cloud Dashboard και λάβετε το Client ID και το Client Secret σας.

Αρχικοποίηση του API

Χρησιμοποιήστε τον παρακάτω κώδικα για να ξεκινήσετε να χρησιμοποιείτε το GroupDocs.Annotation Cloud SDK for Node.js.

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

Δείτε το πλήρες παράδειγμα στο RunExamples.js.

Προσθήκη σχολίου πεδίου κειμένου

Μετά την αρχικοποίηση, χρησιμοποιήστε αυτό το βασικό παράδειγμα για να προσθέσετε ένα σχόλιο πεδίου κειμένου σε ένα έγγραφο Word.

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

Δείτε το πλήρες παράδειγμα στο AddTextFieldAnnotation.js.

Προσθήκη σχολίου περιοχής

Αυτό το παράδειγμα προσθέτει ένα σχόλιο περιοχής σε ένα έγγραφο Word.

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

Δείτε το πλήρες παράδειγμα στο AddAreaAnnotation.js.

Εξαγωγή σχολίων

Αυτό το παράδειγμα επιστρέφει τα σχόλια που είναι αποθηκευμένα σε ένα έγγραφο.

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

Δείτε το πλήρες παράδειγμα στο ExtractAnnotations.js.

Αφαίρεση σχολίων

Αυτό το παράδειγμα διαγράφει τα σχόλια 1, 2 και 3 από ένα έγγραφο.

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

Δείτε το πλήρες παράδειγμα στο DeleteAnnotations.js.

Λήψη υποστηριζόμενων μορφών σχολιασμού

Ανακτήστε τις μορφές εγγράφων που μπορεί να σχολιάσει το API.

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

Δείτε το πλήρες παράδειγμα στο GetSupportedFormats.js.

Παραδείγματα στο GitHub

Το αποθετήριο GroupDocs.Annotation Cloud Node.js Examples περιλαμβάνει έτοιμα προς εκτέλεση παραδείγματα που καλύπτουν:

CategoryExamples
Add AnnotationΠεδίο κειμένου, επισήμανση, υπογράμμιση, διαγραφή, κυματιστή γραμμή, αντικατάσταση, απόκρυψη, περιοχή, βέλος, απόσταση, έλλειψη, εικόνα, σύνδεσμος, σημείο, πολυγραμμή, υδατογράφημα
Extract and RemoveΕξαγωγή σχολίων, διαγραφή σχολίων κατά αναγνωριστικό
PreviewΛήψη σελίδων, διαγραφή σελίδων
Basic UsageΠληροφορίες εγγράφου, υποστηριζόμενες μορφές, λειτουργίες αρχείων, φακέλων και αποθήκευσης

Τρόπος εκτέλεσης των παραδειγμάτων

  1. Κλωνοποιήστε ή κατεβάστε το αποθετήριο παραδειγμάτων
  2. Επεξεργαστείτε το Examples/RunExamples.js και ορίστε τα clientId και clientSecret
  3. Μεταβείτε στον κατάλογο Examples
  4. Εκτελέστε npm install
  5. Εκτελέστε npm update
  6. Εκτελέστε npm run-script start

Για περισσότερες λεπτομέρειες, επισκεφθείτε το 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



 Ελληνικά