Searching comments
Hello,
I am using Acrobat Search plugin HFT functions to search text in the PDF document.
Along with regular text, I also want to search the comments.
In the Edit->Advanced Search panel, there is a option to include the comments in the Search.
I just want to do it programmatically.
Here is my code snippet:
ASText searchKey = ASTextNew();
searchKey = ASTextFromEncoded(searchText, kUTF8);
SearchQueryDataRec srcQuery;
memset(&srcQuery, 0, sizeof (SearchQueryDataRec));
srcQuery.size = sizeof(SearchQueryDataRec);
srcQuery.query = searchKey;
srcQuery.type = kSearchActiveDoc;
srcQuery.scope = kSearchDocumentText | kSearchEveryWhere;
srcQuery.path = NULL;
srcQuery.fs = NULL;
srcQuery.maxDocs = 1;
ASBool ret = SearchExecuteQueryEx(&srcQuery);
As you can see, I used srcQuery.scope = kSearchDocumentText | kSearchEveryWhere;
But I am not able to search through comments. But sometimes it gives me an error like "There was an error retrieving text".
What is it that I am missing here?
Thanks
