Using AnnotationManager's filterAnnotations function

65 views
Skip to first unread message

Matt Parizeau

unread,
May 27, 2015, 7:22:40 PM5/27/15
to pdfnet-w...@googlegroups.com
Q:

We have three annotation authors (user, user_new1, user_new2) and we want to filter different author's annotations using the filterAnnotations function. However it seems like when filtering with "user" all of the annotations will still be visible, so the filtering isn't doing an exact search. How can we filter for each author?

A:

You're correct, the filterAnnotations function will match if the string is contained in the author's name. I would recommend to instead use the new hide/showAnnotations functions to only show annotations of a specific user. See the new hide annotations sample https://www.pdftron.com/webviewer/demo/samples/hide-annotations/index.html. The actual code is in the WebViewer download package under samples/hide-annotations/config.js.
Reply all
Reply to author
Forward
0 new messages