10 Replies Latest reply on Oct 7, 2013 10:15 AM by gkaiseril

    Accessing annotation contents in Reader XI


      I am attempting to write some JavaScript to be able to iterate through the annotations in a document and process each Annotation's contents. I have written the following JavaScript in Acrobat 9 Pro and it outputs the contents fine:

      function onDocumentOpen(document)



          var annots = document.getAnnots();

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

              var annot = annots[i];

              var content = annot.contents;

              console.println(util.printf("=>annot[%d].contents=\"%s\"", i, content));





      However, when I open the same PDF with the JavaScript in Reader XI, I get this error:

      NotAllowedError: Security settings prevent access to this property or method.


      According to the Document Restrictions Summary (File > Properties > Security), Commenting in Reader XI is enabled on the document.


      Any ideas how I can access the contents and richContents of the Annotations on the document?