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.

Docs Swagger Examples Blog Support Release Notes Dashboard

Installation

The package is available at nuget.org and it can be installed via package manager console by executing following command:

PM> NuGet\Install-Package GroupDocs.Annotation-Cloud

Version NuGet NuGet-GroupDocsCloud


Getting Started with GroupDocs.Annotation Cloud

Create an Account

  • Visit the Dashboard and register for a free account.

Create an API Client App

  • Generate your Client ID and Client Secret from the Dashboard to authenticate API requests.

Install the SDK

  • Install the SDK of your choice to integrate GroupDocs.Annotation into your application.
  • For example, to install the .NET SDK:
   PM> Install-Package GroupDocs.Annotation-Cloud

Make Your First API Request

  • Use your Client ID and Client Secret to make an API request. Here’s a sample for retrieving supported formats:
// For complete examples, visit https://github.com/groupdocs-annotation-cloud
string ClientId = "YourClientId";
string ClientSecret = "YourClientSecret";

var configuration = new Configuration(ClientId, ClientSecret);
var apiInstance = new InfoApi(configuration);
var response = apiInstance.GetSupportedFileFormats();

For more detailed examples and SDKs, visit the GitHub repository.

GroupDocs.Annotation Cloud API Data Models

FilesUploadResult, Error, ErrorDetails, FilesList, StorageFile, StorageExist, ObjectExist, DiscUsage, FileVersions, FileVersion, AnnotationInfo, Rectangle, Point, AnnotationReplyInfo, FileInfo, AnnotationApiLink, Link, RemoveOptions, AnnotateOptions, FormatsResult, Format, DocumentInfo, PageInfo, ConsumptionResult, PageImages, PageImage, LinkElement, PreviewOptions

Code Sample 1: Add Text Annotation

This code sample demonstrates how to add a text annotation to a document using GroupDocs.Annotation Cloud SDK for .NET. The text annotation is customizable in terms of position, font, and color.

// Adding a text annotation to a document using GroupDocs.Annotation for .NET SDK.
// Required namespaces
using GroupDocs.Annotation.Cloud.Sdk.Api;
using GroupDocs.Annotation.Cloud.Sdk.Model;
using GroupDocs.Annotation.Cloud.Sdk.Model.Requests;

// Initialize API instance
var configuration = new Configuration { ClientId = "Your_Client_Id", ClientSecret = "Your_Client_Secret" };
var apiInstance = new AnnotateApi(configuration);

// Define the file path and annotation parameters
var filePath = "path/to/document.pdf";
var textAnnotation = new AnnotationInfo
{
    PageNumber = 0, // Apply on the first page
    Type = AnnotationInfo.TypeEnum.Text, // Annotation type
    Text = "This is a text annotation.", // The text to display
    FontColor = 1201033, // RGB color for the text
    Box = new Rectangle { X = 200, Y = 200, Width = 100, Height = 50 } // Position of the annotation
};

// Create a request to add the annotation
var request = new AnnotateRequest { Name = filePath, Annotations = new List<AnnotationInfo> { textAnnotation } };
var response = apiInstance.Annotate(request);
Console.WriteLine("Annotation added: " + response);

Code Sample 2: Add Area Annotation

This code sample demonstrates how to add an area annotation (highlighting a section of a document).

// Adding an area annotation to highlight a specific section of the document.
// Required namespaces
using GroupDocs.Annotation.Cloud.Sdk.Api;
using GroupDocs.Annotation.Cloud.Sdk.Model;
using GroupDocs.Annotation.Cloud.Sdk.Model.Requests;

// Initialize API instance
var configuration = new Configuration { ClientId = "Your_Client_Id", ClientSecret = "Your_Client_Secret" };
var apiInstance = new AnnotateApi(configuration);

// Define the file path and area annotation parameters
var filePath = "path/to/document.pdf";
var areaAnnotation = new AnnotationInfo
{
    PageNumber = 0, // Apply on the first page
    Type = AnnotationInfo.TypeEnum.Area, // Annotation type
    BackgroundColor = 65535, // Highlight color (yellow)
    Box = new Rectangle { X = 100, Y = 150, Width = 200, Height = 100 } // Position and size of the area
};

// Create a request to add the area annotation
var request = new AnnotateRequest { Name = filePath, Annotations = new List<AnnotationInfo> { areaAnnotation } };
var response = apiInstance.Annotate(request);
Console.WriteLine("Area annotation added: " + response);

Code Sample 3: Remove Annotation

This code sample demonstrates how to remove an annotation from a document.

// Removing an annotation from a document using GroupDocs.Annotation for .NET SDK.
// Required namespaces
using GroupDocs.Annotation.Cloud.Sdk.Api;
using GroupDocs.Annotation.Cloud.Sdk.Model;
using GroupDocs.Annotation.Cloud.Sdk.Model.Requests;

// Initialize API instance
var configuration = new Configuration { ClientId = "Your_Client_Id", ClientSecret = "Your_Client_Secret" };
var apiInstance = new AnnotateApi(configuration);

// Define the file path and annotation ID to be removed
var filePath = "path/to/document.pdf";
var annotationId = "your_annotation_id";

// Create a request to remove the annotation
var request = new RemoveAnnotationsRequest { Name = filePath, AnnotationIds = new List<string> { annotationId } };
var response = apiInstance.RemoveAnnotations(request);
Console.WriteLine("Annotation removed: " + response);

Docs Swagger Examples Blog Support Release Notes Dashboard



 English