How to do two annotation Groupby programatically?

Which product are you using?
PDF.js Express Plus

PDF.js Express Version

Detailed description of issue
I am adding two annotations RectangleAnnotation and FreeTextAnnotation annotation programmatically using the same coordinates I want to do groupby that both annotation programmatically how can i do it ? Please share reference or code to do it .

I am showing annotation like above snapshot want to do group by programmatically ?

Thank you for posting your question to our forum. We will provide you with an update as soon as possible.

Hello Shahid,

After creating the two annotations you can use the groupAnnotations API to group them.

    annotationManager.drawAnnotationsFromList([rectangleAnnot, freeTextAnnot]);

    // Group the annotations together
    annotationManager.groupAnnotations(rectangleAnnot, [freeTextAnnot]);

Best Regards,