Skip to content
Guides

Edit Annotations

The steps to edit an annotation are as follows:

  1. Obtain the page object where the annotation needs to be edited.

  2. Access the list of annotations on that page.

  3. Locate the desired annotation in the annotation list and convert it.

  4. Set the properties to the annotation object.

  5. Update the annotation appearance to display it on the document.

This example shows how to edit annotations:

C#
CPDFTextAnnotation textAnnotation = annotList[0] as CPDFTextAnnotation; 
CTextAttribute textAttribute = new CTextAttribute()
{
	FontColor = new byte[] { 255, 0, 0 }, 
	FontSize = 20,
	FontName = "Helvitical"
};
textAnnotation.SetTextAttribute(textAttribute);
textAnnotation.UpdateAp();