Trying to print ONLY the comments from a PDF without the pages to which the comment is linking
I have tried the following JavaScript after entering comments into a pdf in Adobe Pro X :
this.syncAnnotScan();
var a = this.getAnnots();
if (a) {
var rep = new Report();
rep.size = 1.8;
rep.color = color.blue;
rep.writeText("Summary of Comments for " + this.documentFileName);
rep.color = color.black;
rep.writeText(" ");
rep.size = 1.2;
rep.writeText("Total of " + a.length + " comments in this file");
rep.writeText(" ");
rep.writeText(" ");
rep.indent(20);
var msg = "\200 page %s by %s on %s";
for (var i = 0; i < a.length; i++) {
rep.writeText(" ");
rep.writeText(util.printf(msg,1 + a.page,a.author,a.creationDate));
rep.indent(20);
rep.writeText(a.contents);
rep.outdent(20);
}
var docReport = rep.open("commentSummary.pdf");
docReport.info.Title = "Comments Summary for " + this.documentFileName;
}
However, once I hit "Enter" on the numeric keypad, it does create the report, but all of the "bullet" points say "page NaN by undefined on undefined"
Any idea what I am doing wrong?