You can add notes for yourself to record feedback, make comments or flag any edits in a Pdf document. PDF for .NET allows you to add a note and display a small note icon wherever a note is added in the document using the AddNote method.
The following image showcases a line note added to a PDF document.
Using PDF for .NET, you can add the following types of notes in a Pdf document. The following table also lists the respective classes that can be used for adding different types of notes in a Pdf document.
Note Type | Class | Description |
---|---|---|
Line Note | PdfLineNote | Represents a note in a single straight line. |
Circle Note | PdfCircleNote | Represents an elliptical note. |
Square Note | PdfSquareNote | Represents a rectangular note. |
Text Note | PdfTextNote | Represents a text note. |
Additionally, each class mentioned in the above table has its own unique properties which can be used based on your requirements.
To add a line note in a Pdf document, use the following code. This example uses the sample created in Quick Start.
C# |
Copy Code
|
---|---|
RectangleF rect2 = new RectangleF(180, 90, 60, 10); Point p1 = new Point(); p1.X = 5; Point p2 = new Point(); p2.X = 10; //Create a line note PdfLineNote note = new PdfLineNote(p1,p2); note.Contents = "This is a note"; //Add a line note to the Text pdf.AddNote(note, rect2); |