IRONSOFTWAREHOME
USE CASES

How to Add Annotations and Comments to a PDF in C#

Curtis Chau
Curtis Chau
Updated: July 5, 2026

Picture an annotation as a transparent sheet over the page: the sticky-note comment sits on top while the document underneath stays untouched. IronPDF manages that layer through the Annotations collection on a PdfDocument, adding, editing, and removing notes that show as small icons and reveal the full comment when clicked. Because the layer is separate from the content, editing or removing a note leaves all other document properties intact, so annotations fit wherever the original must stay pristine.

Document review and markup

The most common reach for annotations. A review tool attaches feedback to specific spots and saves a commented copy for the next person, source content unchanged:

using IronPdf;
using IronPdf.Annotations;

var pdf = PdfDocument.FromFile("draft.pdf");
pdf.Annotations.Add(new TextAnnotation(0)
{
    Title = "Reviewer",
    Contents = "Clarify this clause.",
    X = 50,
    Y = 700
});
pdf.SaveAs("draft-reviewed.pdf");

Contract collaboration without touching the original

Since the annotation layer stays distinct from the contract body, legal teams can leave notes that never alter the binding text. That separation matters wherever the document must stay pristine for audit or signature.

QA flagging on technical documents

An automated check can drop a positioned note wherever it detects a problem (a missing figure, an out-of-spec value), giving a human a clickable map of issues, not a separate report.

Editing through a revision cycle

Existing annotations can be retrieved and updated as feedback changes or notes need repositioning. This supports approval chains, where a supervisor amends reviewer notes before sign-off:

using System.Linq;

var pdf = PdfDocument.FromFile("draft-reviewed.pdf");
var note = (TextAnnotation)pdf.Annotations.First();
note.Contents = "Resolved in v2.";
note.X = 150;
pdf.SaveAs("draft-updated.pdf");

Cleaning up before distribution

Removal is its own use case. Strip internal or outdated comments before a document goes out, so feedback never leaks to an external audience. Use RemoveAt for one, RemoveAllAnnotationsForPage for a page, or Clear for the whole document. This pairs naturally with sanitization or PDF/A export as a finalization step.

Two things that will bite you

PDF coordinates start from the bottom-left corner, not the top-left most UI frameworks use, and are measured in points (1/72 inch); US Letter is 612 x 792, A4 is 595 x 842. Until you account for this, annotations land in the wrong place.

The annotation collection reindexes after each removal. To delete several, work backwards or collect them first and remove in reverse, or you will delete the wrong ones.

What they are, and are not, for

The documented type is TextAnnotation, the sticky note, with properties for title, contents, position, page, subject, icon, and open state. It is not highlight, ink, or stamp markup. Match it to commentary and review, the job it does well, not visual markup it does not claim to do.

Curtis Chau
Technical Writer

Curtis Chau holds a Bachelor’s degree in Computer Science (Carleton University) and specializes in front-end development with expertise in Node.js, TypeScript, JavaScript, and React. Passionate about crafting intuitive and aesthetically pleasing user interfaces, Curtis enjoys working with modern frameworks and creating well-structured, visually appealing manuals.

...
Read More

Related Articles

Key in blue circle

Get your free 30-day Trial Key instantly.

No limitations. 100% unlocked. No credit card.

bullet_checkedNo credit card or account creation requiredNo limitations. 100% unlocked. No credit card.
  • Logo Aetna
  • Logo NASA
  • Logo GE
  • Logo Porsche
  • Logo USDA
  • Logo Qatar
Join Millions of Engineers who’ve tried IronPDF
Book your free Live Demo
Booking Badge

Trusted by Millions of Engineers Worldwide

Iron Software's customer logos
Get Your No-Obligation Consult
Complete the form below or email sales@ironsoftware.com
Your details will always be kept confidential.
Trusted by Millions of Engineers Worldwide
Iron Software's customer logos
Get your free 30-day Trial Key instantly.
No credit card or account creation required