GroupDocs dengan bangga mengumumkan rilis publik Next Generation GroupDocs.Annotation Cloud 17.12. Ini didasarkan pada GroupDocs.Annotation untuk .NET, sehingga memberikan hasil yang dapat diprediksi dan terbukti sama untuk fungsi anotasi di Cloud. GroupDocs.Annotation Cloud adalah RESTful API yang memanipulasi anotasi dalam semua format file bisnis umum. Ini memungkinkan pengembang untuk mengelola anotasi interaktif dan penjelasan untuk kata, frasa, dan wilayah tertentu dari konten dokumen dalam aplikasi lintas platform apa pun. Ini mendukung semua anotasi Teks dan Gambar utama dan yang terpenting, ini menyediakan fitur anotasi ini tanpa harus menginstal perangkat lunak pihak ketiga. Silakan periksa catatan rilis untuk daftar lengkap fitur versi pertama GroupDocs.Annotation Cloud. Bagian berikut menjelaskan beberapa detail mengenai fitur ini.

Anotasi Impor

Saat memanipulasi anotasi, mengimpor anotasi dari dokumen adalah persyaratan dasar aplikasi. Anda dapat dengan mudah mengimpor anotasi menggunakan REST API berikut, ini mencantumkan anotasi sebagai Objek AnnotationInfo. Silakan lihat URI berikut, perintah REST (Curl) dan contoh .NET SDK untuk tujuan tersebut. URI

https://api.groupdocs.cloud/v1/annotation/{filename}/annotations

Contoh istirahat (cURL)

curl -v "https://api.groupdocs.cloud/v1/annotation/Annotated.pdf/annotations" \
-X GET \
-H "Content-Type: application/json" \
-H "authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx” 

Contoh .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);
} 

Anotasi Ekspor

GroupDocs.Annotation Cloud REST API untuk menambahkan anotasi gambar dan teks dalam dokumen yang didukung. Anda dapat menggunakan API berikut untuk menambahkan (mengekspor) anotasi ke dokumen. Ia mengharapkan Objek AnnotationInfo di badan permintaan. Silakan lihat URI berikut, data Permintaan JSON, perintah REST (Curl) dan contoh .NET SDK untuk tujuan tersebut. URI

https://api.groupdocs.cloud/v1/Annotation/{filename}/html/pdf

Minta Data

[{"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" }]}] 

Contoh istirahat (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” 

Contoh .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);
} 

Penjelajah API

GroupDocs untuk Cloud REST API juga dilengkapi dengan API Explorer berbasis web. Ini adalah cara termudah untuk langsung mencoba API kami di browser Anda. Ini adalah kumpulan dokumentasi Swagger untuk API Cloud GroupDocs. Sederhananya, pertama Anda perlu mendaftar dengan GroupDocs Cloud, dapatkan kunci APP dan SID dan mulai menguji GropuDocs.Annotation Cloud Rest API di browser favorit Anda secara interaktif.

GroupDocs.Sumber Anotasi Cloud

Berikut adalah tautan ke beberapa sumber berguna yang mungkin Anda perlukan untuk menyelesaikan tugas Anda.

Mulai Uji Coba Gratis Hari Ini

Mulai uji coba gratis hari ini – yang Anda perlukan hanyalah mendaftar dengan layanan Cloud GroupDocs. Setelah Anda mendaftar, Anda siap untuk mencoba fitur pemrosesan file canggih yang ditawarkan oleh GroupDocs Cloud.