Browse our Products

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.


Product Docs Swagger Examples Blog Support Dashboard

Installation

Le package est disponible sur nuget.org et peut être installé via la console du Gestionnaire de package avec la commande suivante :

NuGet\Install-Package GroupDocs.Annotation-Cloud

Version NuGet NuGet-GroupDocsCloud


Configuration requise

  • .NET Framework 2.0 ou .NET Standard 2.0
  • NuGet
  • System.Web lors du ciblage de .NET Framework 2.0
  • Informations d’identification GroupDocs Cloud — Client ID and Client Secret du tableau de bord

Démarrage rapide

Obtenir vos identifiants d’API

Pour utiliser GroupDocs.Annotation Cloud, inscrivez-vous sur le tableau de bord GroupDocs.Cloud et obtenez le Client ID et le Client Secret.

Initialiser l’API

Utilisez le code suivant pour commencer à utiliser GroupDocs.Annotation Cloud SDK for .NET.

using GroupDocs.Annotation.Cloud.Sdk.Api;
using GroupDocs.Annotation.Cloud.Sdk.Client;

string MyClientId = "YourClientId";
string MyClientSecret = "YourClientSecret";

var config = new Configuration(MyClientId, MyClientSecret);
config.ApiBaseUrl = "https://api.groupdocs.cloud";

var apiInstance = new AnnotateApi(config);

Consultez l’exemple complet dans Constants.cs.

Ajouter une surbrillance de texte

Cet exemple ajoute une surbrillance de texte à un document Word dans le stockage cloud.

using System;
using System.Collections.Generic;
using System.Linq;
using GroupDocs.Annotation.Cloud.Sdk.Api;
using GroupDocs.Annotation.Cloud.Sdk.Client;
using GroupDocs.Annotation.Cloud.Sdk.Model;
using GroupDocs.Annotation.Cloud.Sdk.Model.Requests;

var config = new Configuration("YourClientId", "YourClientSecret");
config.ApiBaseUrl = "https://api.groupdocs.cloud";
var apiInstance = new AnnotateApi(config);

var options = new AnnotateOptions
{
    FileInfo = new FileInfo { FilePath = "one-page.docx" },
    Annotations = new List<AnnotationInfo>
    {
        new AnnotationInfo
        {
            Points = new List<Point>
            {
                new Point { X = 80, Y = 730 }, new Point { X = 240, Y = 730 },
                new Point { X = 80, Y = 650 }, new Point { X = 240, Y = 650 }
            },
            BackgroundColor = 65535,
            PageNumber = 0,
            Type = AnnotationInfo.TypeEnum.TextHighlight,
            Text = "This is text highlight annotation",
            CreatorName = "Anonym A."
        }
    },
    OutputPath = "Output/output.docx"
};

var link = apiInstance.Annotate(new AnnotateRequest(options));
Console.WriteLine("AddTextHighlightAnnotation: Text highlight Annotation added: " + link.Title);

Consultez l’exemple complet dans AddTextHighlightAnnotation.cs.

Ajouter une annotation de zone

Cet exemple ajoute une annotation de zone à la première page.

using System.Collections.Generic;
using System.Linq;
using GroupDocs.Annotation.Cloud.Sdk.Api;
using GroupDocs.Annotation.Cloud.Sdk.Client;
using GroupDocs.Annotation.Cloud.Sdk.Model;
using GroupDocs.Annotation.Cloud.Sdk.Model.Requests;

var config = new Configuration("YourClientId", "YourClientSecret");
config.ApiBaseUrl = "https://api.groupdocs.cloud";
var apiInstance = new AnnotateApi(config);

var options = new AnnotateOptions
{
    FileInfo = new FileInfo { FilePath = "one-page.docx" },
    Annotations = new List<AnnotationInfo>
    {
        new AnnotationInfo
        {
            AnnotationPosition = new Point { X = 1, Y = 1 },
            Box = new Rectangle { X = 100, Y = 100, Width = 100, Height = 100 },
            PageNumber = 0,
            Type = AnnotationInfo.TypeEnum.Area,
            Text = "This is area annotation",
            CreatorName = "Anonym A."
        }
    },
    OutputPath = "Output/output.docx"
};

var link = apiInstance.Annotate(new AnnotateRequest(options));
Console.WriteLine("AddAreaAnnotation: Area Annotation added: " + link.Title);

Consultez l’exemple complet dans AddAreaAnnotation.cs.

Supprimer des annotations

Cet exemple supprime les annotations 1, 2 et 3.

using System.Collections.Generic;
using GroupDocs.Annotation.Cloud.Sdk.Api;
using GroupDocs.Annotation.Cloud.Sdk.Client;
using GroupDocs.Annotation.Cloud.Sdk.Model;
using GroupDocs.Annotation.Cloud.Sdk.Model.Requests;

var config = new Configuration("YourClientId", "YourClientSecret");
config.ApiBaseUrl = "https://api.groupdocs.cloud";
var apiInstance = new AnnotateApi(config);

var options = new RemoveOptions
{
    FileInfo = new FileInfo { FilePath = "one-page.docx" },
    AnnotationIds = new List<int?> { 1, 2, 3 },
    OutputPath = "Output/output.docx"
};

var link = apiInstance.RemoveAnnotations(new RemoveAnnotationsRequest(options));
Console.WriteLine("DeleteAnnotations: Annotations deleted: " + link.Title);

Consultez l’exemple complet dans DeleteAnnotations.cs.

Extraire des annotations

Cet exemple lit les annotations d’un document.

using GroupDocs.Annotation.Cloud.Sdk.Api;
using GroupDocs.Annotation.Cloud.Sdk.Client;
using GroupDocs.Annotation.Cloud.Sdk.Model;
using GroupDocs.Annotation.Cloud.Sdk.Model.Requests;

var config = new Configuration("YourClientId", "YourClientSecret");
config.ApiBaseUrl = "https://api.groupdocs.cloud";
var apiInstance = new AnnotateApi(config);

var response = apiInstance.Extract(new ExtractRequest(new FileInfo { FilePath = "input.docx" }));
Console.WriteLine("ExtractAnnotations: annotations count = " + response.Count);

Consultez l’exemple complet dans ExtractAnnotations.cs.

Obtenir les formats de fichier pris en charge

Récupérez les formats acceptés par l’API annotation.

using GroupDocs.Annotation.Cloud.Sdk.Api;
using GroupDocs.Annotation.Cloud.Sdk.Client;

var config = new Configuration("YourClientId", "YourClientSecret");
config.ApiBaseUrl = "https://api.groupdocs.cloud";
var apiInstance = new InfoApi(config);

var response = apiInstance.GetSupportedFileFormats();
Console.WriteLine("GetSupportedFormats: formats count = " + response.Formats.Count);

Consultez l’exemple complet dans GetSupportedFormats.cs.

Exemples sur GitHub

Le dépôt GroupDocs.Annotation Cloud .NET Examples contient des exemples prêts à être exécutés sur :

CategoryExamples
AjouterZone, flèche, distance, ellipse, image, lien, point, polyligne, surbrillance de texte, soulignement, barré, caviardage, filigrane
GérerSupprimer des annotations, extraire des annotations, annotation directe
InfoInformations sur le document, formats pris en charge
AperçuObtenir des pages, supprimer des pages

Comment exécuter les exemples

  1. Clonez ou téléchargez le dépôt d’exemples
  2. Ouvrez Examples/GroupDocs.Annotation.Cloud.Examples.sln dans Visual Studio 2017 ou ultérieur
  3. Cliquez avec le bouton droit sur la solution et sélectionnez Enable NuGet Package Restore
  4. Modifiez Examples/GroupDocs.Annotation.Cloud.Examples/Program.cs et définissez Constants.MyClientId et Constants.MyClientSecret
  5. Générez et exécutez

Pour plus de détails, consultez Getting Started.


Product Docs Swagger Examples Blog Support Dashboard




 Français