GroupDocs는 차세대 GroupDocs.Annotation Cloud 17.12.의 공개 릴리스를 발표하게 된 것을 자랑스럽게 생각합니다. 이는 .NET용 GroupDocs.Annotation을 기반으로 하므로 클라우드의 주석 기능에 대해 동일한 입증된 예측 가능한 결과를 제공합니다. 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 Cloud 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에는 웹 기반 API 탐색기도 함께 제공됩니다. 브라우저에서 바로 API를 사용해 볼 수 있는 가장 쉬운 방법입니다. GroupDocs Cloud API에 대한 Swagger 설명서 모음입니다. 간단히 말해서 먼저 GroupDocs Cloud에 가입하고, APP 키와 SID를 가져오고 좋아하는 브라우저에서 대화식으로 GropuDocs.Annotation Cloud Rest API 테스트를 시작해야 합니다.

GroupDocs.Annotation 클라우드 리소스

다음은 작업을 수행하는 데 필요할 수 있는 몇 가지 유용한 리소스에 대한 링크입니다.

지금 무료 평가판 시작

지금 무료 평가판을 시작하세요. GroupDocs Cloud 서비스에 가입하기만 하면 됩니다. 등록하면 GroupDocs Cloud에서 제공하는 강력한 파일 처리 기능을 사용할 준비가 된 것입니다.