Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

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

New Here ,
Apr 25, 2017 Apr 25, 2017

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!

TOPICS
Acrobat SDK and JavaScript
611
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Apr 25, 2017 Apr 25, 2017

You can use the Search APIs or do it yourself.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 26, 2017 Apr 26, 2017

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
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Apr 26, 2017 Apr 26, 2017

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 26, 2017 Apr 26, 2017

I am using highlight annotation.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Apr 26, 2017 Apr 26, 2017

Then it will find the text in your annot as highlights are markup.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 26, 2017 Apr 26, 2017

Please tell me what should I use to search for comments in the highlight annotation.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Apr 26, 2017 Apr 26, 2017
LATEST

Exactly what you are doing…

If you add a highlight with Acrobat and then run your search, does it find it? I wonder if your annotations are not correct.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines