Copy link to clipboard
Copied
Hi All,
Is there any property available to add reply for the particular comments/annotation using JavaScript in Acrobat.
Please guide me if it is possible.
Thanks!
Yes, it's possible. You basically create a normal annotation and then set its inReplyTo property to point to the name property of the annotation to which you are replying. See also the refType property, which lets you define the kind of reply it is.
Copy link to clipboard
Copied
Yes, it's possible. You basically create a normal annotation and then set its inReplyTo property to point to the name property of the annotation to which you are replying. See also the refType property, which lets you define the kind of reply it is.
Copy link to clipboard
Copied
Hi try67​,
Thanks for your logic and it is working fine at my end.
Also could you please suggest how to find the list of annotations which is having reply comments.
Thanks!
Copy link to clipboard
Copied
That's more complicated. You would need to scan all the annotations in the
file, collecting the values of their inReplyTo properties to an array, then
you can access those annotations in the array using the getAnnot(name)
method.
On Tue, Feb 14, 2017 at 3:58 PM, Sajeev Sridharan <forums_noreply@adobe.com>
Copy link to clipboard
Copied
Hi try67​
var annots = this.getAnnots()
var replyArray = [];
for ( var i= 0; i< annots.length; i++) //Looping all annotations
{
replyArray.push(annots.inReplyTo);//storing inReplyTo value to an array
}
Please guide me how to find the annotation which is having reply comments and you have told that using the getAnnot(name) method it is possible. Could you please explain with some examples.
Thanks!
Copy link to clipboard
Copied
After your code you can iterate over the replyArray, and within it iterate again over the whole annots array.
If replayArray==annots
Find more inspiration, events, and resources on the new Adobe Community
Explore Now