Review, Markup, and Approval
Managing Comments
7
Using the Comments List
Once you have acquired the comments list through the
doc
object’s
syncAnnotScan
and
getAnnots
methods, you may change their status, appearance, order, and visibility.
In addition, you will be able to search for comments having certain characteristics.
Changing the Status of Comments
To change the status of a comment using Acrobat JavaScript, invoke the corresponding
annot
object’s
transitionToState
method, as shown in the code below:
// Transition myAnnot to the "approved" state:
myAnnot.transitionToState("ReviewStates", "approved");
Changing the Appearance of Comments
You may change the appearance of a comment in a variety of ways. If the comment is a
stamp annotation, you may change its appearance by setting its
AP
property. In general,
the appearance of any comment may be changed by invoking the
annot
object’s
setProps
method, as shown in the code below:
myAnnot.setProps({
page: 0,
points: [[10,40], [200,200]],
strokeColor: color.red,
popupOpen: true,
popupRect: [200,100,400,200],
arrowBegin: "Diamond",
arrowEnd: "OpenArrow"
});
Marking Comments with Checkmarks
You may use the Acrobat user interface to place checkmarks next to comments, or use
Acrobat JavaScript to do the equivalent by changing the status of a comment (see
Acrobat JavaScript Scripting Guide
137