JavaScript invalidates the certified document
I would like to display all the attachments in the document in a list which are attached by addAnnot. For that purpose I created a list which will run below script on mouseUp event.. But whenever the script runs, it basically invalidates the certified document with an invisible signature. I need to prevent any unauthorized modification in the document, for that purpose I created certified document. Any Idea how to make it right or please suggest me if I am doing something wrong as I am new to acrobat development.
var annots = this.getAnnots();
var aAttach = annots.filter(function(a){return (a.type=="FileAttachment");});
for (var i = 0; i < aAttach.length; i++)
attachList.push(aAttach[i].attachment.name);
event.target.setItems(attachList);
