Highlighted

How to get Annotation reply comments?

New Here ,
May 11, 2016

Copy link to clipboard

Copied

Hi,

I used below code for read Annotation comment from the pdf document using acrobat pro 11 . But I need to read Annotation  reply comments also. Any way to achieve this?.

var annots = this.getAnnots({

nPage:1,

nSortBy: ANSB_Author,

bReverse: true

});

console.show();

console.println("Number of Annotations: " + annots.length);

var msg = "%s in a %s annot said: \"%s\"";

for (var i = 0; i < annots.length; i++)

console.println(util.printf(msg, annots.author, annots.type,

annots.contents));

Thanks,

Kesavan R

Topics

Acrobat SDK and JavaScript, Windows

Views

169

Likes

Translate

Translate

Report

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

How to get Annotation reply comments?

New Here ,
May 11, 2016

Copy link to clipboard

Copied

Hi,

I used below code for read Annotation comment from the pdf document using acrobat pro 11 . But I need to read Annotation  reply comments also. Any way to achieve this?.

var annots = this.getAnnots({

nPage:1,

nSortBy: ANSB_Author,

bReverse: true

});

console.show();

console.println("Number of Annotations: " + annots.length);

var msg = "%s in a %s annot said: \"%s\"";

for (var i = 0; i < annots.length; i++)

console.println(util.printf(msg, annots.author, annots.type,

annots.contents));

Thanks,

Kesavan R

Topics

Acrobat SDK and JavaScript, Windows

Views

170

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Most Valuable Participant ,
May 12, 2016

Copy link to clipboard

Copied

This code should return all kinds of annotations, including replies. Is

that not the case?

On Thu, May 12, 2016 at 9:09 AM, kesavanraju7 <forums_noreply@adobe.com>

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
New Here ,
Aug 01, 2020

Copy link to clipboard

Copied

I have a similar question to this one (which appears to not have been followed up on).

I have a need similar to that above - but am only able to retrieve the original contents, not any replys.  I have not been able to find any posts related to retrieving that information.  I was thinking that maybe contents was an array, but that does not seem to be the case.  Any info or direction would be greatly appreciated.

 

Simple example:

   var aAnnots = this.selectedAnnots;
   for (var i=0; i < aAnnots.length; i++) {
     console.println(aAnnots[i].contents);
     }

 

Thanks,

Nick

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Most Valuable Participant ,
Aug 02, 2020

Copy link to clipboard

Copied

You're not doing the same as the original poster did. You're accessing the selected annots array. They used the getAnnots method to retrieve the annotations. You can not select a reply, only a top-level comment, so doing it like that will not work. To access replies you must use getAnnots and then check the inReplyTo property of each annotation. If it's not empty then it will contain the name property of the comment to which it replied.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
New Here ,
Aug 02, 2020

Copy link to clipboard

Copied

Thank you - will give it a shot !

 

Nick

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Resources
One Stop Solution for Acrobat
Edit a PDF