Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Add reply to the annotation thru javascript

Enthusiast ,
Feb 14, 2017 Feb 14, 2017

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!

TOPICS
Acrobat SDK and JavaScript
956
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Feb 14, 2017 Feb 14, 2017

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.

Translate
Community Expert ,
Feb 14, 2017 Feb 14, 2017

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Feb 14, 2017 Feb 14, 2017

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!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 14, 2017 Feb 14, 2017

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>

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Feb 15, 2017 Feb 15, 2017

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!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 15, 2017 Feb 15, 2017
LATEST

After your code you can iterate over the replyArray, and within it iterate again over the whole annots array.

If replayArray==annots.name then you found your target annotation.

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