Searching a document with search.query
I wrote a working script to compare every word in a document to a list of words I want to flag. It works but is incredibly slow. I know that Acrobat has an indexing feature. Maybe I can tap into that?
I've been playing with search.query, but it doesn't look like it actually returns anything. Please don't tell me to look in the manual :-)... it isn't described there much.
My loop is:
for (var i = 0; i < currentDoc.numPages; i++ )
{
...
for (var j = 0; j < currentDoc.getPageNumWords(i); j++)
{
....
for (var n = 0; n < wordItem.length; n++) // my list of terms I want to look for
{
If found, comment-highlight the word.
}
}
}
Thanks for any help you can give me!
Rick
