Correct. That’s why I used the array constructor [... matchAll(…)]. Alternatively, Array.from(matchAll(…)) does the same thing – build an Array from something else.
Correct. I overlooked that you’re concating arrays.
See Script: Add page label to PDF annotations
It’s buried there, too ![]()