I got an interesting request from Rick Borstein who is one of our Acrobat Product Specialists. It seems that one of his customers is using the new Compare Documents feature in Acrobat 9 for long legal documents. This is actually a perfect use case for this feature but the customer is hampered by the fact that Compare Documents can sometimes find too much. As a text heavy legal document, they don’t have much need for the per pixel differences in graphics and certainly don’t need to see “Matching graphic not found” beside every change bar.
To solve the UI problem, I decided write the script so that it could detect which annotation was selected, determine it’s properties and then look for more just like it. That way the user just needs to select an annotation, choose my menu item "Delete Annotations of the Same Type and with the Same Content as the one Selected" and all that’s it. No UI required.
The example demonstrates
- Adding SubMenus and Menu Items
- Detecting which annotation is selected
- Detecting annotation properties
- Deleting annotations
- Use of the thermometer object
Under that menu, you will find three additional menu items.
- Delete “Matching graphic not found” Annotations
This menu item will delete all “Highligh” annotations with content “Matching graphic not found”
- Delete Annotations of the Same Type and with the Same Content as the one Selected
To use this menu item, select one of the type of comment that occurs frequently that you want to remove all of then select the menu item.
All comments of the same type and same content will be deleted.
- Count Annotations of the Same Type and with the Same Content as the one Selected
Same as above except that comments are not deleted, they are simply counted.
Installing Joel’s Comment Utilities
1. Quit Acrobat if it is already running
2. Download “Joel’s Comment Utilities” and then copy the ADBE_JFG_RemoveMatchingAnnots.js file into the following file location:
a. WIN XP
b. WIN VISTA
c. MAC OSX
3. Restart Acrobat
Using the Reduce Comments Script
1. Open a PDF containing comparison comments
2. Choose one of the following commands:
a. Comments | “Joel’s Comment Utilities” | Delete Matching Graphic Not Found Comments
– or -
b. With another type of comment selected, choose:
Comments | Joel’s Comment Utilities | Delete Annotations with same content as one selected