Define the Annotations to which the specific action is applied. There are multiple options how to do that.
- In the combobox, select predefined annotations sets defined by regex
- In the combobox, check the desired annotations
- Define the annotations types using a regular expression format
- Define the annotation by the template
Define annotations by Regex
Annotation types can be easily defined by a regular expression format. For example:
All annotations:
.*
All annotations except Widget|Popup|Link
^(?!Link$|Widget$|Popup$).
All annotations except Popup
(?!Popup$).*
Markup annotations
Highlight$|^Underline$|^Squiggly$|^StrikeOut$
Test the regex on https://regex101.com/
Define annotations by Template
Define by template option allows you to define more complex query for annotations. Select the option “Define by the template” from the Annotations combo box.
In the Edit template dialog choose the Plain Template option and replace the code with examples bellow.
Example 1: All annotations except hidden and invisible
{
"template": {
"annot_update": [
{
"query": {
"$and": [
{
"$0_annot_type": {
"$regex": ".*"
}
},
{
"$not": [
{
"$0_annot_flag": {
"$regex": "invisible"
}
}
]
},
{
"$not": [
{
"$0_annot_flag": {
"$regex": "hidden"
}
}
]
}
],
"param": [
"pdf_annot"
]
},
"statement": "$if"
}
]
}
}