Copy link to clipboard
Copied
I want to create an annotation for a selected piece of text. I use the CreateAnnotations example for this at the page https://github.com/datalogics/adobe-pdf-library-samples/tree/master/CPlusPlus/Sample_Source/Annotati....
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.
Please tell me how to make the annotation border rectangular.
I would be grateful for your help.
Have something to add?