So I just upgraded to Acrobat from Reader yesterday so I could take notes on books for school. I found out how to export the comments from a PDF to a new document using a JS, and have enjoyed using the following:
// Get the comments in this document, and sort by author
- this.syncAnnotScan();
annots = this.getAnnots({nSortBy: ANSB_Author});
// Open a new report
var rep = new Report();
- rep.size = 1.2;
- rep.color = color.blue;
if (annots) {
- rep.writeText("Summary of Comments: By Author");
- rep.color = color.black;
- rep.writeText(" ");
- rep.writeText("Number of Comments: " + annots.length);
- rep.writeText(" ");
var msg = "\200 page %s: \"%s\"";
var theAuthor = annots[0].author;
- rep.writeText(theAuthor);
- rep.indent(20);
for (var i=0; i < annots.length; i++) {
if (theAuthor != annots[i].author) {
theAuthor = annots[i].author;
- rep.writeText(" ");
- rep.outdent(20);
- rep.writeText(theAuthor);
- rep.indent(20);
}
- rep.writeText(
- util.printf(msg, 1 + annots[i].page, annots[i].contents));
}
} else {
var msg = "No annotations found in this document, %s.";
- rep.writeText(util.printf(msg, this.documentFileName));
}
// Now open the report
var docRep = rep.open("myreport.pdf");
- docRep.info.Title = "Comments for " + this.docuentFileName;
docRep.info.Subject = "Comments";
What I'm curious about is if there is a way around having both highlighted and underlined text go instantly to comments. If it's possible to get just one or the other to automatically enter the comments that might save me a ton of time manually copying and making decisions like "is this really worth the extra size of the output file." Those kinds of decisions really slow down my reading process. Rigth now I've been exporting pages of stuff, and even though I can search what I export it's going to become unmanageable.
The only thing I can think is to only copy things that I specifically wanted exported to the comments, and to just do this manually so I don't end up with too much highlighted/underlined text.
(Also, and this one isn't that important...is there a way to save the JS I have been using to all the PDFs that I have? Right now I have just been copy pasting it to each PDF that I make.)
Thanks in advance,
Matt