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.

インストール
パッケージは npmjs.com で入手できます。次のコマンドを実行して npm でインストールできます。
npm install groupdocs-annotation-cloud

要件
依存関係
SDK には次のパッケージが必要です。
| Package | Constraint |
|---|
| axios | 1.8.4 |
| form-data | * |
| jsonwebtoken | 9.0.1 |
| qs | 6.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 リポジトリには、次を扱う実行可能なサンプルが含まれています。
| Category | Examples |
|---|
| Add Annotation | テキストフィールド, ハイライト, 下線, 取り消し線, 波線, 置換, 墨消し, エリア, 矢印, 距離, 楕円, 画像, リンク, 点, ポリライン, 透かし |
| Extract and Remove | 注釈の抽出, ID による注釈の削除 |
| Preview | ページの取得, ページの削除 |
| Basic Usage | 文書情報, 対応形式, ファイル, フォルダー, ストレージの操作 |
サンプルの実行方法
- サンプルリポジトリ をクローンまたはダウンロードします
Examples/RunExamples.js を編集し、clientId と clientSecret を設定しますExamples ディレクトリに移動しますnpm install を実行しますnpm update を実行しますnpm run-script start を実行します
詳細は 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