How to make the annotation border rectangular

Explorer ,
Feb 21, 2020 Feb 21, 2020

Copy link to clipboard


I want to create an annotation for a selected piece of text. I use the CreateAnnotations example for this at the page
Create annotation:
static ASAtom atH = ASAtomFromString ("Highlight");
PDAnnot highlight = PDPageCreateAnnot (p, atH, & annotationRect);
and set its coordinates and color (I use the SetAnnotationQuads function from the example for this).
Naturally, only the main part of the code is given here.
As a result, the selected text fragment is painted in the desired color, but the border of the selected fragment is not rectangular, as I would like, but some strange shape to the left and right of the text. This can be seen in the figure.scr.PNG

Please tell me how to make the annotation border rectangular.

I would be grateful for your help.

Acrobat SDK and JavaScript







Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation