GroupDocs は、次世代 GroupDocs.Annotation Cloud 17.12. の公開リリースを発表できることを誇りに思います。これは、GroupDocs.Annotation for .NET に基づいているため、クラウドの注釈機能に対して同じ実証済みの予測可能な結果が提供されます。 GroupDocs.Annotation Cloud は、すべての一般的なビジネス ファイル形式の注釈を操作する RESTful API です。これにより、開発者は、クロスプラットフォーム アプリケーションのドキュメント コンテンツの特定の単語、フレーズ、領域に対する対話型の説明的な注釈を管理できます。すべての主要なテキストと図の注釈をサポートしており、何よりも、サードパーティ ソフトウェアをインストールすることなくこれらの注釈機能を提供します。 GroupDocs.Annotation Cloud の最初のバージョンの機能の完全なリストについては、リリース ノート を確認してください。次のセクションでは、これらの機能に関する詳細について説明します。
注釈のインポート
注釈を操作する際、ドキュメントから注釈をインポートすることは、アプリケーションの基本的な要件です。以下のREST APIを使用すると、アノテーションをAnnotationInfo Objectとしてリスト化することで簡単にアノテーションをインポートすることができます。その目的については、次の URI、REST コマンド (Curl)、および .NET SDK の例を参照してください。 URI
https://api.groupdocs.cloud/v1/annotation/{filename}/annotations
残りの例(cURL)
curl -v "https://api.groupdocs.cloud/v1/annotation/Annotated.pdf/annotations" \
-X GET \
-H "Content-Type: application/json" \
-H "authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx”
.NET SDKの例
//TODO: Get your AppSID and AppKey at https://dashboard.groupdocs.cloud (free registration is required).
var configuration = new Configuration
{
AppSid = Sid,
AppKey = Key
};
var apiInstance = new AnnotationApi(configuration);
try
{
var request = new GetImportRequest()
{
Name = "Annotated.pdf",
Folder = null,
Password = null
};
// Import annotations from document
var response = apiInstance.GetImport(request);
foreach (var entry in response)
Debug.Print("Box :" + entry.Box);
}
catch (Exception e)
{
Debug.Print("Exception when getting Annotation Information: " + e.Message);
}
注釈のエクスポート
GroupDocs.Annotation クラウド REST API は、サポートされているドキュメントに 図とテキストの注釈 を追加します。以下のAPIを利用して、ドキュメントにアノテーションを追加(エクスポート)することができます。リクエスト本文に AnnotationInfo オブジェクトが必要です。その目的については、以下の URI、JSON リクエスト データ、REST コマンド(Curl)、および .NET SDK の例を参照してください。 URI
https://api.groupdocs.cloud/v1/Annotation/{filename}/html/pdf
データのリクエスト
[{"creatorName":"Anonym A.","box":{ "x":173.0, "y":154.89, "width":142.5, "height":9.0 },"pageNumber":0,"annotationPosition":{ "x":173.0, "y":154.88999938964844 },"svgPath":"[{'x':173.2986,'y':687.5769},'x':315.7985,'y':687.5769},{'x':173.2986,'y':678.5769},{'x':315.7985,'y':678.5769}]","type":0,"replies":[{ "userName":"Admin", "message":"reply text", "repliedOn":"2017-03-16T18:19:14" },{ "userName":"Commentator", "message":"reply2 text", "repliedOn":"2017-03-16T18:19:14" }]}]
残りの例(cURL)
curl -v "https://api.groupdocs.cloud/v1/annotation/Annotated.pdf/annotations" \
-X PUT \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d "[{"creatorName":"Anonym A.","box":{ "x":173.0, "y":154.89, "width":142.5, "height":9.0 },"pageNumber":0,"annotationPosition":{ "x":173.0, "y":154.88999938964844 },"svgPath":"[{'x':173.2986,'y':687.5769},'x':315.7985,'y':687.5769},{'x':173.2986,'y':678.5769},{'x':315.7985,'y':678.5769}]","type":0,"replies":[{ "userName":"Admin", "message":"reply text", "repliedOn":"2017-03-16T18:19:14" },{ "userName":"Commentator", "message":"reply2 text", "repliedOn":"2017-03-16T18:19:14" }]}]" \
-H "authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx”
.NET SDKの例
//TODO: Get your AppSID and AppKey at https://dashboard.groupdocs.cloud (free registration is required).
var configuration = new Configuration
{
AppSid = Sid,
AppKey = Key
};
var apiInstance = new AnnotationApi(configuration);
try
{
List annotations = new List();
AnnotationInfo annotation = new AnnotationInfo
{
AnnotationPosition = new Point(852, 154.31),
Replies = new[]
{
new AnnotationReplyInfo {Message = "reply text", RepliedOn = DateTime.Now, UserName = "Admin"},
new AnnotationReplyInfo
{
Message = "reply2 text",
RepliedOn = DateTime.Now,
UserName = "Commentator"
}
},
Box = new Rectangle((float)173.29, (float)154.31, (float)142.5, 9),
PageNumber = 0,
SvgPath =
"[{\"x\":173.2986,\"y\":687.5769},{\"x\":315.7985,\"y\":687.5769},{\"x\":173.2986,\"y\":678.5769},{\"x\":315.7985,\"y\":678.5769}]",
Type = AnnotationType.Text,
CreatorName = "Anonym A."
};
annotations.Add(annotation);
PutExportRequest request = new PutExportRequest()
{
Name ="Annotated.pdf",
Folder=null,
Password=null,
Body=annotations,
};
// Insert/Export annotations to document.
var response = apiInstance.PutExport(request);
Debug.Print("Document Processsed and stream length: " + response.Length);
}
catch (Exception e)
{
Debug.Print("Exception when inserting Annotation to document: " + e.Message);
}
APIエクスプローラー
Cloud REST API 用の GroupDocs には、Web ベースの API Explorer も付属しています。これは、ブラウザで API をすぐに試す最も簡単な方法です。これは、GroupDocs Cloud API の Swagger ドキュメントのコレクションです。したがって、単純に、まず GroupDocs Cloud に サインアップし、APP キーと SID を取得して、お気に入りのブラウザで対話的に GropuDocs.Annotation Cloud Rest API のテストを開始する必要があります。
GroupDocs.Annotation クラウド リソース
以下は、タスクを達成するために必要となるいくつかの役立つリソースへのリンクです。
- GropuDocs.Annotation クラウド
- GropuDocs.Annotation クラウド オンライン ドキュメント
- GropuDocs.Annotation クラウド UI のヘルプ トピック
- GropuDocs.Annotation クラウド フォーラム
- Web APIエクスプローラー(ライブサンプル)
- GropuDocs.Annotation クラウド SDK
- Web GUI または GroupDocs Cloud Service を使用して GroupDocs Cloud Storage を操作する
- Web GUI または GroupDocs Cloud Service を使用して、GroupDocs の使用状況とログを操作します。
今すぐ無料トライアルを開始してください
今すぐ無料トライアルを開始してください。GroupDocs Cloud サービスにサインアップするだけで済みます。サインアップすると、GroupDocs Cloud が提供する強力なファイル処理機能を試すことができます。