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

How to get Annotation reply comments?

New Here ,
May 11, 2016 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

751

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
community guidelines
Community Expert ,
May 12, 2016 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>

Votes

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
community guidelines
New Here ,
Aug 01, 2020 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

Votes

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
community guidelines
Community Expert ,
Aug 02, 2020 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.

Votes

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
community guidelines
New Here ,
Aug 02, 2020 Aug 02, 2020

Copy link to clipboard

Copied

LATEST

Thank you - will give it a shot !

 

Nick

Votes

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
community guidelines