GroupDocs è orgoglioso di annunciare il rilascio pubblico di Next Generation GroupDocs.Annotation Cloud 17.12. Si basa su GroupDocs.Annotation per .NET, fornendo così gli stessi comprovati risultati prevedibili per la funzionalità di annotazione in Cloud. GroupDocs.Annotation Cloud è un’API RESTful che manipola le annotazioni in tutti i comuni formati di file aziendali. Consente agli sviluppatori di gestire annotazioni interattive ed esplicative a parole, frasi e regioni specifiche del contenuto dei documenti in qualsiasi applicazione multipiattaforma. Supporta tutte le principali annotazioni di testo e figura e, soprattutto, fornisce queste funzionalità di annotazione senza dover installare alcun software di terze parti. Consulta le note di rilascio per l’elenco completo delle funzionalità della prima versione di GroupDocs.Annotation Cloud. Le sezioni seguenti descrivono alcuni dettagli relativi a queste funzionalità.

Importa annotazioni

Durante la manipolazione delle annotazioni, l’importazione delle annotazioni dai documenti è un requisito fondamentale di un’applicazione. Puoi importare facilmente l’annotazione utilizzando la seguente API REST, elenca l’annotazione come AnnotationInfo Object. Consultare l’URI seguente, il comando REST (Curl) e l’esempio di SDK .NET per lo scopo. URI

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

Esempio di riposo (cURL)

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

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

Esporta annotazione

L’API REST di GroupDocs.Annotation Cloud per aggiungere annotazione di figura e testo nel documento supportato. È possibile utilizzare la seguente API per aggiungere (esportare) annotazioni al documento. Si aspetta AnnotationInfo Object nel corpo della richiesta. Consultare l’URI seguente, i dati della richiesta JSON, il comando REST (Curl) e l’esempio di SDK .NET per lo scopo. URI

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

Richiedi dati

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

Esempio di riposo (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” 

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

Esplora API

Le API REST di GroupDocs for Cloud vengono fornite anche con un API Explorer basato sul web. È il modo più semplice per provare subito la nostra API nel tuo browser. È una raccolta di documentazione Swagger per le API GroupDocs Cloud. Quindi, semplicemente, prima devi registrarti con GroupDocs Cloud, ottenere la chiave APP e il SID e iniziare a testare GropuDocs.Annotation Cloud Rest API nel tuo browser preferito in modo interattivo.

Risorse cloud di GroupDocs.Annotation

Di seguito sono riportati i collegamenti ad alcune risorse utili di cui potresti aver bisogno per svolgere le tue attività.

Inizia una prova gratuita oggi

Inizia oggi stesso una prova gratuita: tutto ciò di cui hai bisogno è iscriverti al servizio GroupDocs Cloud. Dopo esserti registrato, sei pronto per provare le potenti funzionalità di elaborazione dei file offerte da GroupDocs Cloud.