Skip to main content
navnathk72131083
Participant
Apr 25, 2017 12:45 PM UTC
Question

What is the best way to search through comments using acrobat plugin SDK?

Hello,

I have created a plugin to create highlight annotation using acrobat plugin SDK.

Now, I want to search through comments of annotations.

How can I achieve this using acrobat plugin api?

Thank you in advance!

This topic is closed to new replies. Start a new post to keep the conversation going.

7 replies

lrosenth
Adobe Employee
Adobe Employee
Apr 25, 2017 1:47 PM UTC

You can use the Search APIs or do it yourself.

Translate
navnathk72131083
Participant
Apr 26, 2017 12:31 PM UTC

Hello,

I used Search APIs to search through comments:

Here is my code snippet:

ASText searchKey;

searchKey = ASTextFromUnicode((ASUTF16Val*)reqText, kUTF16HostEndian);

SearchQueryDataRec srcQuery;

memset(&srcQuery, 0, sizeof(SearchQueryDataRec));

srcQuery.size = sizeof(SearchQueryDataRec);

srcQuery.query = searchKey;

srcQuery.type = kSearchActiveDoc;

srcQuery.scope = kSearchDocumentText | kSearchMarkup;

srcQuery.maxDocs = 1;

SearchExecuteQueryEx(&srcQuery);

ASTextDestroy(searchKey);

As per the documentation, kSearchMarkup option is used to search markups (In my case,annotations).

But it is not searching through annotation comments.

It gives me "Not found" error in a search panel at left.

Where am I wrong in this code?

Thank you in advance!

Translate
lrosenth
Adobe Employee
Adobe Employee
Apr 26, 2017 12:54 PM UTC

SearchMarkup will search the contents of markup annotations. What type of annot are you using?

Translate