Extracting only the comment response and importing it on pdf

Amongst the all annotation done on pdf, can we extract the response only for the comments, and how can we retains/import those extracted response of comment on pdf.
Kindly provide code snippet.

Hello nikhilhill19,

To clarify: you only want to export the annotation replies?

If that’s the case you can filter the annotations you wish to export, then provide that in:

annotList: // your annotation list

Best regards,

Yes I only want to export the annotation replies.
What should I pass inside annotList array?

Hello nikhilhill19,

You would pass in a list of the reply annotations,

annotList: instance.Core.annotationManager.getAnnotationsList().filter((annot)=> annot.isReply() === true)

Best regards