.NET Document Annotation API for PDF, Word & More

Add text, watermark, polyline, underline, and many other types of watermarks to your PDF, Word, Excel, Outlook, Visio, HTML, images, and more files with the cross-platform .NET annotation API by GroupDocs.

Download Free TrialView All APIs

Enhance The Document Review Process with Annotations

GroupDocs.Annotation for .NET provides powerful markup and labeling features for different types of documents and images. It allows developers to add, remove, edit, and extract annotations in PDF, MS Office, OpenDocument, AutoCAD, HTML, PNG, BMP, GIF, JPG, CSV, and more file types. The on-premise API helps developers improve the document review and approval workflow while enabling users to build custom annotation tools in .NET. It makes the annotating process convenient by offering simple and easy-to-use methods that developers can utilize to empower their document processing solutions.

The .NET document annotation API supports several types of annotations, such as watermark, area, polyline, text, underline, point, and ellipse. Users can change annotation color or size, create image previews of the documents, display file pages as images, retrieve file information, remove existing document annotations, develop PDF annotator apps, and do much more with the API. GroupDocs.Annotation for .NET API has all the tools needed for creating cross-platform, high-performance .NET document review and collaboration solutions capable of functioning seamlessly across Windows, Linux, Mac OS, and multiple platforms and frameworks.

Getting Started

Before getting started with .NET document annotation API, please check the list of prerequisites on the System Requirements page to ensure your system meets the recommended OS, framework, and development environment settings. This will help you with a smooth installation and issue-free user experience.

GroupDocs.Annotation for .NET Installation

To download the MSI installer or the DLLs and set up the .NET annotation library, please visit the downloads section. You can also use the NuGet package to install the library. The command for setting up the library from the Visual Studio package manager console is given below:

PM > Install-Package GroupDocs.Annotation

Optimize Your .NET Annotation Apps: Add or Remove Annotations in PDFs

Annotations are an essential part of the document review process, and they help users highlight issues, suggest improvements, or efficiently convey document-related information to different users. GroupDocs.Annotation for .NET boasts excellent annotation manipulation features for .NET developers to annotate various document formats and also includes the ability to modify or delete existing annotations in a document.

Add Text Field Annotations to PDFs in .NET

The .NET document annotation API supports multiple annotation types that can be added to the supported file formats. One of these is the text field annotation, which enables users to insert some text within a rectangular shape. The following C# code example provides more insight on how to do it.

  • Create an instance of the Annotator class with the input file path.
  • Initiate a TextFieldAnnotation class object, and set desired properties.
  • Use the Add method to add the annotation to the document.
  • Save the PDF with the annotation using the Save method.
//Add text field annotation to a PDF document from a local disk
using (Annotator annotator = new Annotator("path/input.pdf"))
{
	TextFieldAnnotation textField = new TextFieldAnnotation
    {
    	BackgroundColor = 65535,
        Box = new Rectangle(100, 100, 100, 100),
        CreatedOn = DateTime.Now,
        Text = "Some text",
        FontColor = 65535,
        FontSize = 12,
        Message = "This is text field annotation",
        Opacity = 0.7,
        PageNumber = 0,
        PenStyle = PenStyle.Dot,
        PenWidth = 3,
        FontFamily = "Arial",
        TextHorizontalAlignment = HorizontalAlignment.Center,
        Replies = new List
        {
        	new Reply
            {
            	Comment = "First comment",
                RepliedOn = DateTime.Now
            },
            new Reply
            {
            	Comment = "Second comment",
                RepliedOn = DateTime.Now
            }
        }
	};
    annotator.Add(textField);
    annotator.Save("result.pdf");
}


Remove Annotations from PDFs in .NET

Removing annotations from documents is another crucial aspect of the document review procedure and could help clean the file before the finalization stage. The .NET PDF annotation API lets you remove existing annotations in PDF files. Let’s review the following C# coding example to learn more.

  • Instantiate the Annotator class and add the input file path.
  • Initialize the SaveOptions class object, used for additional options.
  • Set the annotation types to None to remove all annotations.
  • Use the Save method to save the updated PDF with annotations removed.
// Remove all the annotations from a PDF document in .NET
using (Annotator annotator = new Annotator("path/input.pdf"))
{
  SaveOptions saveOptions = new SaveOptions();
                saveOptions.AnnotationTypes = AnnotationType.None;
    	annotator.Save("path/document-noAnnotation.pdf", saveOptions);
}

Please visit the GroupDocs.Annotation for .NET GitHub examples page to check more working code examples. If you are looking to annotate PDF, Word, Excel, and PowerPoint documents, emails, images, or Visio and HTML files on the fly from your mobiles or tablets, please check our Free Online Document Annotations Apps today.

Annotate Documents in .NET Apps with No Dependencies

GroupDocs.Annotation for .NET is a comprehensive, standalone document and image annotator library that does not require additional software installations. With the library, you can independently develop PDF annotator apps and other feature-rich document and image annotation solutions on the .NET platform. It supports you in enhancing your existing apps or annotating files within your newly created applications. The .NET document annotation API works equally well on popular OS, platforms, and frameworks, delivering an unmatched document collaboration experience.

FAQ

1. How does GroupDocs.Annotation for .NET enhance document collaboration?

GroupDocs.Annotation for .NET provides all necessary tools and features to optimize document collaboration solutions by adding markup labels and annotations to the documents. With these markups, users can share feedback for improving the file and resolving relevant problems, thus contributing towards an enhanced collaboration process.

2. Are there code examples for adding annotations using the .NET API?

Yes, we provide coding examples for the .NET document annotation API, which are available on the GitHub examples page of the API. These code examples guide the users in adding annotations to the supported types of documents with ease.

3. What document formats are supported for annotation?

The annotation API for .NET supports an array of popular document and image formats such as Microsoft Word, Excel, PowerPoint, PDF, ODT, ODP, EML, MSG, HTML, VSD, VSS, DWG, CAD, DXF, CSV, OTP, JPG, BMP, GIF, PNG, TIFF, DICOM & more for annotation.

4. Are there any security features implemented in the API to protect sensitive annotations and data?

Of course! You can rest assured about the security of your documents and images while processing them using the .NET API. We ensure the privacy of your data and take all required measures to provide you with a secure user experience.

5. Is GroupDocs.Annotation for .NET compatible with different .NET frameworks?

Yes, the .NET annotation API is compatible with different frameworks, OS, platforms, and operating environments. To learn more, please visit the System Requirements page of the API.

Looking for help?

Checkout our support channels for help with your questions related to GroupDocs product API features and working.

Ready to get started?

Download Free Trial View All APIs