Skip to footer content

How to Add and Edit PDF Annotations in C#

In this tutorial, we delve into the world of PDF annotations using IronPDF in a C# environment. The process begins with installing IronPDF and setting up your project. We create a Chrome PDF renderer instance to render HTML as a PDF, providing a basic PDF structure to work with.

The tutorial covers creating a text annotation object for the first page of the PDF, specifying its location through X and Y coordinates, and adding it to the PDF's annotation collection. After saving, this results in your first annotated PDF.

Editing existing annotations involves loading a PDF document and accessing its annotations collection. By updating the properties of the first annotation, including its title, contents, and coordinates, we save the changes to a new file.

Finally, deleting annotations is demonstrated by loading a PDF, identifying the annotation to remove via its index, and using the 'remove at' method to delete it.

The tutorial wraps up by showcasing the results: a PDF with the initial annotation, another with edited annotations, and one with the second annotation removed. The video encourages viewers to try IronPDF through a free trial link provided. This tutorial is designed to enhance your PDF management skills by teaching you to effectively add, edit, and delete annotations.

Further Reading: How to Add and Edit PDF Annotations

Chipego
Software Engineer
Chipego has a natural skill for listening that helps him to comprehend customer issues, and offer intelligent solutions. He joined the Iron Software team in 2023, after studying a Bachelor of Science in Information Technology. IronPDF and IronOCR are the two products Chipego has been focusing on, but his knowledge of all products is growing daily, as he finds new ways to support customers. He enjoys how collaborative life is at Iron Software, with team members from across the company bringing their varied experience to contribute to effective, innovative solutions. When Chipego is away from his desk, he can often be found enjoying a good book or playing football.