Why does my callout annotation overlap the arrow?

Q:

I have a callout annotation that I set the text and arrow of, but the arrow is hidden under the text. Also the “RD” dictionary is missing. Why?

A:

You will need to call SetContentRect:

https://www.pdftron.com/pdfnet/docs/PDFNetJava/pdftron/PDF/Annots/Markup.html#setContentRect(pdftron.PDF.Rect)

This sets the “RD” dictionary, which is a sub-rectangle containing the text only. Without this dictionary, the full bounding box of the annotation is assumed to be the space in which to write the text. Thus the arrow becomes occluded by the rectangle containing the text.