I'm not sure if I'm missing it somewhere...but I can no longer sort comments by color, which was a hugely advantageous for my use. Have I missed this option somewhere?
I'm not sure if I'm missing it somewhere...but I can no longer sort comments by color, which was a hugely advantageous for my use. Have I missed this option somewhere?
function compareStrokes(a,b){return (a.strokeColor<b.strokeColor)? -1:1;} 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 by Color 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";a.sort(compareStrokes);for (var i = 0; i < a.length; i++) {rep.writeText(" ");rep.writeText(util.printf(msg,1 + a[i].page,a[i].author,a[i].creationDate));rep.color = a[i].strokeColor;rep.writeText("================================");rep.color = color.black;rep.indent(20);rep.writeText("Contents: " + a[i].contents);rep.outdent(20);}var docReport = rep.open("commentsByColor.pdf");docReport.info.Title = "Comments Summary by Color for " + this.documentFileName;}
function getAnnotsByColor(doc, c) { doc.syncAnnotScan(); var annots = doc.getAnnots(); if (annots==null) return; for (var i=annots.length-1; i>=0; i--) { if (!color.equal(annots[i].strokeColor,c)) { annots.splice(i,1); } } return annots; }
var justYellowAnnots = getAnnotsByColor(this, color.yellow); var justGreenAnnots = getAnnotsByColor(this, color.green);