Socket
Book a DemoInstallSign in
Socket

GroupDocs.Annotation

Package Overview
Dependencies
Maintainers
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

GroupDocs.Annotation

GroupDocs.Annotation for .NET is a lightweight but powerful API that offers a wide range of graphics, text, and watermark annotations. Apply annotations to a document and export the result into the desired format. Annotate PDF, DOCX/DOC, PPTX/PPT, XLSX/XLS, JPG, PNG, TIFF, VSDX/VSD, ODT, ODS, ODP, EML, HTML, and many other formats to collaborate, comment and review documents with GroupDocs.Annotation for .NET.

nugetNuGet
Version
25.11.0
Version published
Maintainers
2
Created
Source

Document Annotation .NET API

Package version Package downloads .NET

banner

Product Page Docs API Ref Examples Blog Releases Support License

GroupDocs.Annotation for .NET is an on-premise API that integrates advanced document annotation capabilities into .NET applications. With support for 35+ file formats including PDF, Word, Excel, and images, it allows developers to add, edit, and remove annotations across multiple platforms (Windows, Linux, Mac). It offers features such as text, image, QR-code, and metadata annotations, along with collaboration options like comments and replies. Advanced features include document redaction, text replacement, and distance measurement. Additionally, the API supports cloud integration with Amazon S3, Azure, and FTP, making it a flexible solution for document management.

Features Overview

Cross-Platform Annotation

Add annotations to various formats (PDF, Word, Excel, PowerPoint, images) across Windows, Mac, and Linux environments.

Multi-Annotation Support

Supports over 13 different annotation types for 35+ file formats, including text, graphic, and watermark annotations.

Collaborative Commenting

Add, remove, or reply to comments for any annotation type, facilitating collaborative document reviews.

Document Preview Generation

Create document page previews or thumbnails to ensure accurate annotation placement.

Annotation Caching

Use caching solutions like Amazon S3, Dropbox, and Redis to store annotation results for high-performance applications.

Annotation Types

Text Signatures

Add customizable text-based signatures to documents in multiple styles (highlight, strikeout, underline).

Image Signatures

Embed images as annotations, allowing rotation, color adjustments, and transparency settings.

Digital Signatures

Add and verify cryptographically secure digital signatures with support for PDFs and other formats.

QR-Code & Barcode Signatures

Apply QR-code and barcode annotations with custom encoding and style options.

Metadata Signatures

Embed metadata into documents as hidden signatures for enhanced tracking and document management.

Stamp Signatures

Add round or rectangular stamps with customizable text, shape, and color settings.

Advanced Annotation Features

Redaction Annotations

Redact sensitive information by covering it with black boxes, ensuring privacy in documents.

Replacement Annotation

Replace specific document text with new text, a powerful feature for document editing.

Distance & Measurement Annotations

Measure distances between objects or areas within the document.

ZIndex Control

Adjust the Z-index to place image annotations above or below text for enhanced document control.

Document Management

Metadata Extraction

Retrieve detailed metadata from documents, including file type, page count, and document dimensions.

Search & Filter Annotations

Search for specific annotation types or keywords across large document sets.

Version Control for Annotated Documents

Track changes and version histories for documents that have undergone multiple annotations.

Cloud Integration

Amazon S3 & Azure Blob Integration

Load and save annotated documents directly from cloud storage, including Amazon S3 and Azure Blob Storage.

FTP & Web URL Support

Load documents from FTP servers or web URLs for easier access to remote documents.

Collaboration & Exporting

Export to Original Format

Annotated documents can be saved in their original format (PDF, Word, etc.) without losing annotations.

Commenting System

Supports collaboration by allowing teams to add replies to annotations or remove comments.

Import & Export Annotations

Easily import annotations from other software or export them for further use.

Customization & Flexibility

Custom Font Support

Load and apply custom fonts for text annotations, ensuring consistency across corporate branding.

Annotation Filters

Save only the annotated pages or filter specific annotation types when saving documents.

Set Image Quality & Resolution

Adjust the resolution and quality of image-based annotations for detailed previews.

Supported Document Formats

FormatDescriptionAnnotate
DOCMicrosoft Word 97-2003 Document✔️
DOCXMicrosoft Word Document✔️
DOCMMicrosoft Word Macro-Enabled Document✔️
DOTMicrosoft Word 97-2003 Template✔️
DOTXMicrosoft Word Template✔️
DOTMMicrosoft Word Macro-Enabled Template✔️
RTFRich Text Document✔️
ODTOpenDocument Text✔️
XLSMicrosoft Excel 97-2003 Worksheet✔️
XLSXMicrosoft Excel Worksheet✔️
XLSM *xlsxMicrosoft Excel Macro-Enabled Worksheet✔️
XLSB *xlsxMicrosoft Excel Binary Worksheet✔️
ODS *xlsxOpenDocument Spreadsheet✔️
PPTMicrosoft PowerPoint 97-2003 Presentation✔️
PPTXMicrosoft PowerPoint Presentation✔️
PPSMicrosoft PowerPoint 97-2003 Slide Show✔️
PPSX *pptxMicrosoft PowerPoint Slide Show✔️
ODPOpenDocument Presentation✔️
TIF, TIFFTagged Image File Format (TIFF)✔️
JPG, JPEGJoint Photographic Experts Group (JPEG)✔️
PNGPortable Network Graphics (PNG)✔️
BMPBitmap Picture (BMP)✔️
DWG *pngAutodesk Design Data Formats✔️
DXF *pngDrawing Interchange Format✔️
PDF (PDF/A-1a, PDF/A-1b, PDF/A-2a)Adobe Portable Document Format (PDF)✔️
HTM *htmlHyperText Markup Language (HTM)✔️
HTMLHyperText Markup Language (HTML)✔️
EMLE-mail Message (EML)✔️
EMLX *emlE-mail Message (EMLX)✔️
VSD *vsdxMicrosoft Visio 2003-2010 Drawing✔️
VSDXMicrosoft Visio Drawing✔️
VSDM *vsdxMicrosoft Visio Drawing File Format✔️
VSS *vsdxMicrosoft Visio 2003-2010 Stencil✔️
VSSX *vsdxVisio Stencil File Format✔️
VST *vsdxMicrosoft Visio 2013 Stencil✔️
VSTM *vsdxMicrosoft Visio Template File Format✔️

Supported Annotation Types

Annotation TypeDescription
AreaRectangle annotation applied to any location on a document page.
ArrowPointer or arrow-style annotation for marking directions.
DistanceArrow at both ends, used for measuring distances between objects.
EllipseCircle-based annotation for highlighting circular areas.
LinkWeb link annotation, supported in PDF, Word, and presentation documents.
PointAbstract point annotation for marking spots.
PolylineFreehand drawing line annotation.
Resource RedactionFixed-position black rectangle to hide sensitive information.
Text FieldRectangle annotation with text inside.
HighlightText-highlighting annotation, applicable only to text.
Text RedactionBlack rectangle to hide specific text content.
ReplacementReplace the original document text with user-provided text.
StrikeoutStrike-through text annotation, applicable to text.
UnderlineUnderline text annotation, applicable to text.
WatermarkAdd a text watermark to all pages, with optional rotation settings.

Supported Operating Systems

GroupDocs.Annotation for .NET supports any 32-bit or 64-bit OS with .NET or .NET Core, including:

Windows

Windows 2003 and later, Vista, XP, 7, 8, 8.1, 10 (x64, x86)

Linux

Ubuntu, OpenSUSE, CentOS, and others

Mac

macOS

Supported Frameworks

  • .NET Core: 3.1
  • .NET Standard: 2.1
  • .NET Frameworks:
    • 2.0, 3.5 (until v22.5)
    • 4.0, 4.5.x, 4.6.x, 4.7.x, 4.8

Development Environments

  • Microsoft Visual Studio 2010 and later
  • Microsoft Visual Studio for Mac
  • JetBrains Rider

Installation

Add GroupDocs.Annotation to your .NET project via NuGet or download DLLs from GroupDocs.

Install via NuGet

NuGet Package Manager

  • Open Solution Explorer in Visual Studio, right-click your project, and select Manage NuGet Packages.
  • Search for "GroupDocs.Annotation" and click Install.

Package Manager Console

  • Open Package Manager Console in Visual Studio.
  • Run:
    Install-Package GroupDocs.Annotation
    

.NET CLI

  • Run the following command in your project folder:
    dotnet add package GroupDocs.Annotation
    

Download from Website

Download assemblies from GroupDocs Releases, then add the DLL reference manually via Add Reference in Visual Studio.

Add Area Annotation to the Document

Add an area annotation to a PDF document using GroupDocs.Annotation for .NET, specifying color, opacity, and message properties.

// Import required namespaces
using (Annotator annotator = new Annotator("input.pdf"))
{
    // Create a new area annotation
    AreaAnnotation area = new AreaAnnotation
    {
        // Set background color for the annotation
        BackgroundColor = 65535,
        // Set position and size of the annotation box
        Box = new Rectangle(100, 100, 100, 100),
        // Set creation date
        CreatedOn = DateTime.Now,
        // Annotation message
        Message = "This is area annotation",
        // Set annotation opacity
        Opacity = 0.7,
        // Page number where the annotation will be placed
        PageNumber = 0,
        // Set pen color and style for the annotation border
        PenColor = 65535,
        PenStyle = PenStyle.Dot,
        // Set pen width
        PenWidth = 3,
        // Add replies to the annotation
        Replies = new List<Reply>
        {
            new Reply
            {
                Comment = "First comment",
                RepliedOn = DateTime.Now
            },
            new Reply
            {
                Comment = "Second comment",
                RepliedOn = DateTime.Now
            }
        }
    };
    // Add the annotation to the document
    annotator.Add(area);
    // Save the annotated document
    annotator.Save("result.pdf");
}

Add Arrow Annotation to the Document

Apply an arrow annotation to a PDF document using GroupDocs.Annotation for .NET with custom properties such as pen color and style.

// Import required namespaces
using (Annotator annotator = new Annotator("input.pdf"))
{
    // Create a new arrow annotation
    ArrowAnnotation arrow = new ArrowAnnotation
    {
        // Set position and size of the arrow annotation
        Box = new Rectangle(100, 100, 100, 100),
        // Set creation date
        CreatedOn = DateTime.Now,
        // Annotation message
        Message = "This is arrow annotation",
        // Set annotation opacity
        Opacity = 0.7,
        // Page number where the annotation will be placed
        PageNumber = 0,
        // Set pen color and style for the annotation border
        PenColor = 65535,
        PenStyle = PenStyle.Dot,
        // Set pen width
        PenWidth = 3,
        // Add replies to the annotation
        Replies = new List<Reply>
        {
            new Reply
            {
                Comment = "First comment",
                RepliedOn = DateTime.Now
            },
            new Reply
            {
                Comment = "Second comment",
                RepliedOn = DateTime.Now
            }
        }
    };
    // Add the arrow annotation to the document
    annotator.Add(arrow);
    // Save the annotated document
    annotator.Save("result.pdf");
}

Add Ellipse Annotation to the Document

Use GroupDocs.Annotation for .NET to add an ellipse annotation to a PDF, complete with background color, opacity, and comments.

// Import required namespaces
using (Annotator annotator = new Annotator("input.pdf"))
{
    // Create a new ellipse annotation
    EllipseAnnotation ellipse = new EllipseAnnotation
    {
        // Set background color for the ellipse
        BackgroundColor = 65535,
        // Set position and size of the ellipse annotation
        Box = new Rectangle(100, 100, 100, 100),
        // Set creation date
        CreatedOn = DateTime.Now,
        // Annotation message
        Message = "This is ellipse annotation",
        // Set annotation opacity
        Opacity = 0.7,
        // Page number where the annotation will be placed
        PageNumber = 0,
        // Set pen color and style for the annotation border
        PenColor = 65535,
        PenStyle = PenStyle.Dot,
        // Set pen width
        PenWidth = 3,
        // Add replies to the annotation
        Replies = new List<Reply>
        {
            new Reply
            {
                Comment = "First comment",
                RepliedOn = DateTime.Now
            },
            new Reply
            {
                Comment = "Second comment",
                RepliedOn = DateTime.Now
            }
        }
    };
    // Add the ellipse annotation to the document
    annotator.Add(ellipse);
    // Save the annotated document
    annotator.Save("result.pdf");
}

Load Document from URL

Load a PDF document from a URL and add an area annotation using GroupDocs.Annotation for .NET. Save the annotated document to a specified location.

// Define the URL for the PDF file to be annotated
string url = "https://github.com/groupdocs-annotation/GroupDocs.Annotation-for-.NET/blob/master/Examples/Resources/SampleFiles/input.pdf?raw=true";

// Load the PDF file from the URL
using (Annotator annotator = new Annotator(GetRemoteFile(url)))
{
    // Create a new area annotation
    AreaAnnotation area = new AreaAnnotation()
    {
        // Set position and size of the annotation
        Box = new Rectangle(100, 100, 100, 100),
        // Set background color for the annotation
        BackgroundColor = 65535,
    };
    // Add the annotation to the document
    annotator.Add(area);
    // Save the annotated document to the specified location
    annotator.Save("result.pdf");
}

// Method to retrieve the file as a stream from a remote URL
private static Stream GetRemoteFile(string url)
{
    WebRequest request = WebRequest.Create(url);
    using (WebResponse response = request.GetResponse())
        return GetFileStream(response);
}

// Method to create a file stream from the web response
private static Stream GetFileStream(WebResponse response)
{
    MemoryStream fileStream = new MemoryStream();
    using (Stream responseStream = response.GetResponseStream())
        responseStream.CopyTo(fileStream);
    fileStream.Position = 0;
    return fileStream;
}

Product Page Docs API Ref Examples Blog Releases Support License

Tags

Document Annotation API | Cross-Platform Annotation | GroupDocs.Annotation | PDF Annotation | Word Annotation | Excel Annotation | PowerPoint Annotation | Image Annotation | Digital Signatures | QR-Code Signatures | Metadata Signatures | Stamp Signatures | Redaction Annotations | Replacement Annotations | Distance Measurement | Document Preview | Annotation Caching | Amazon S3 Integration | Azure Blob Storage Integration | FTP Support | Web URL Support | Commenting System | Annotation Collaboration | Custom Font Support | Annotation Filters | Image Quality Control | Version Control for Annotations

Keywords

GroupDocs.Annotation

FAQs

Package last updated on 06 Nov 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts