PDF Annotations in .NET with IronPDF
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");
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");
Imports IronPdf
Imports IronPdf.Annotations
Dim pdf = PdfDocument.FromFile("draft.pdf")
pdf.Annotations.Add(New TextAnnotation(0) With {
.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");
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");
Imports System.Linq
Dim pdf = PdfDocument.FromFile("draft-reviewed.pdf")
Dim note = CType(pdf.Annotations.First(), TextAnnotation)
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.
Frequently Asked Questions
How do I add a text annotation to a PDF in C# with IronPDF?
Use the Annotations.Add method on a PdfDocument with a TextAnnotation object. Set the page index, X/Y position (in PDF points from the bottom-left), title, and contents properties.
Does adding or removing an annotation change the underlying PDF content?
No. The annotation layer is separate from the document content. Editing or removing annotations leaves all other document properties, text, and images intact.
How do I remove annotations from a PDF before distributing it?
Use RemoveAt(index) to delete a single annotation, RemoveAllAnnotationsForPage(pageIndex) to clear a page, or Annotations.Clear() to strip all annotations from the document.
Why are my annotations appearing in the wrong position?
PDF coordinates start from the bottom-left corner, not the top-left corner most UI frameworks use. Coordinates are measured in points (1/72 inch). US Letter is 612 x 792 points; A4 is 595 x 842 points. Adjust your X and Y values accordingly.
Can I update an existing annotation's text or position?
Yes. Retrieve the annotation from the Annotations collection, cast it to TextAnnotation, and update its Contents, X, Y, or other properties before saving the document.

