Scripting a Comment Summary Report with option to select page ranges
Hello everyone,
I am using Adobe Acrobat X Pro on Window 7.
I am a newbie to JavaScript but have been using the following script (actually found on this great forum!) to create a PDF Comment Summary Report.
It works great, but I would like to be able to include a line of code to select only specific page ranges (1-40) as I am working with a PDF with 700 pages and want to create a Summary Report for specific chapters. I tried inserting a code for printing specific pages, but when I used Ctrl-Enter to run the script it would just bring up the Print window.
Any help would be appreciated.
Thank you!
this.syncAnnotScan();
var a = this. getAnnots({nSortBy:ANSB_Page});
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.indent(20);
rep.writeText(a.contents);
rep.outdent(20);
}
var docReport = rep.open("commentSummary.pdf");
docReport.info.Title = "Comments Summary for " + this.documentFileName;
}
