How do I change the “color” property of the “Sticky Note”annotation?

Q: Is there a way to edit the “color” property of the “Sticky Note”annotation?

A:

The ‘Sticky Note’ annotation is represented with ‘pdftron.PDF.Annots.Text’
http://www.pdftron.com/pdfnet/html/classpdftron_1_1PDF_1_1Annots_1_1Text.html

You can change the color property using annot.SetColor() method in Annot base class http://www.pdftron.com/pdfnet/html/classpdftron_1_1PDF_1_1Annot.html#eaebdbf9b23e5492df8b1b469d2d00da

For example:

ColorPt (0, 0, 1);

annot.SetColor(rgb, 3);

should set the color to blue.

You can also change default icon with pdftron.PDF.Annots.Text.SetIcon(). Alternatviely you can set a completely custom annotation appearance using annot.SetAppearance()