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.

Instalación
El paquete está disponible en npmjs.com y se puede instalar mediante npm ejecutando el siguiente comando:
npm install groupdocs-annotation-cloud

Requisitos
Dependencias
El SDK requiere los siguientes paquetes:
| Package | Constraint |
|---|
| axios | 1.8.4 |
| form-data | * |
| jsonwebtoken | 9.0.1 |
| qs | 6.11.2 |
Inicio rápido
Obtenga sus credenciales de API
Para usar GroupDocs.Annotation Cloud, regístrese en el GroupDocs.Cloud Dashboard y obtenga su Client ID y Client Secret.
Inicialice la API
Utilice el siguiente código para empezar a usar el 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);
Vea el ejemplo completo en RunExamples.js.
Agregue una anotación de campo de texto
Una vez inicializado, use este ejemplo básico para agregar una anotación de campo de texto a un documento de 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);
})();
Vea el ejemplo completo en AddTextFieldAnnotation.js.
Agregue una anotación de área
Este ejemplo agrega una anotación de área a un documento de 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);
})();
Vea el ejemplo completo en AddAreaAnnotation.js.
Este ejemplo devuelve las anotaciones almacenadas en un documento.
"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);
})();
Vea el ejemplo completo en ExtractAnnotations.js.
Elimine anotaciones
Este ejemplo elimina las anotaciones 1, 2 y 3 de un documento.
"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);
})();
Vea el ejemplo completo en DeleteAnnotations.js.
Recupere los formatos de documento que la API puede anotar.
"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);
})();
Vea el ejemplo completo en GetSupportedFormats.js.
Ejemplos en GitHub
El repositorio GroupDocs.Annotation Cloud Node.js Examples incluye ejemplos listos para ejecutar que cubren:
| Category | Examples |
|---|
| Add Annotation | Campo de texto, resaltado, subrayado, tachado, línea ondulada, reemplazo, redacción, área, flecha, distancia, elipse, imagen, enlace, punto, polilínea, marca de agua |
| Extract and Remove | Extraer anotaciones, eliminar anotaciones por id |
| Preview | Obtener páginas, eliminar páginas |
| Basic Usage | Información del documento, formatos compatibles, operaciones de archivos, carpetas y almacenamiento |
Cómo ejecutar los ejemplos
- Clone o descargue el repositorio de ejemplos
- Edite
Examples/RunExamples.js y establezca clientId y clientSecret - Vaya al directorio
Examples - Ejecute
npm install - Ejecute
npm update - Ejecute
npm run-script start
Para obtener más detalles, visite Getting Started.

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