How to create Text Annotation with Oval shape border?

This forum post shows how to edit the default appearances, so you can re-use the existing text layout logic, but change things like the border.

A possible improvement for your case, would be to make two annotations, a FreeText (with no border) and Circle, then read from both appearance streams and write to one single appearance, then discard the Circle and add the FreeText one to the page.

Note, that whenever you deviate from the default appearance, any future change to the annotation will result in it going back to the default appearance. For example, if someone later opens the PDF in another PDF viewer and edits the text, or resizes it, the round border would be lost.