Is it possible to do multiple keywords searching?

PDF-XChange Viewer SDK for Developer's
(ActiveX and Simple DLL Versions)

Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan

Post Reply
crimsonlogic
User
Posts: 38
Joined: Tue Jan 12, 2016 2:25 am

Is it possible to do multiple keywords searching?

Post by crimsonlogic »

Hi Support,

There is the requirement for multiple keywords searching:

To search multiple keywords at same time and highlight the result with different color.

Please refer the attachment for understanding the requirement.

Thanks
Attachments
multiple search pdf.pdf
a simple UI for multiple searching
(168.03 KiB) Downloaded 161 times
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17824
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Is it possible to do multiple keywords searching?

Post by Tracker Supp-Stefan »

Hello crimsonlogic,

I do not believe this is possible with the Viewer SDK.
As you may be aware - the Viewer AX SDK is no longer actively developed and will not get any new features - so is switching to the Editor SDK something you would consider?

The end user Editor has a multi coloured search options, so the same should be available through the Editor SDK as well. I will now ask a colleague from the dev team to check this topic and see if we can provide a code sample.

Regards,
Stefan
User avatar
Vasyl-Tracker Dev Team
Site Admin
Posts: 2352
Joined: Thu Jun 30, 2005 4:11 pm
Location: Canada

Re: Is it possible to do multiple keywords searching?

Post by Vasyl-Tracker Dev Team »

Hi, crimsonlogic.

Please look to our SDK-example located:

"<Program Files>\Tracker Software\PDF-XChange Viewer SDK\Examples\<Language>\TextOperations"

- it shows how to get access to text on page and how to highlight text using different colors.

In new Editor SDK you may do it in similar way:

1. by accessing to page text directly (trough IPXC_PageText) and finding corresponding entries
2. by adding colored highlight-annotations to such places (it will modify the document in runtime)
or
2*. by using special IPXV_DocHighlighter to display colored marks for found entries (without any document modifications)

HTH.
Vasyl Yaremyn
Tracker Software Products
Project Developer

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
crimsonlogic
User
Posts: 38
Joined: Tue Jan 12, 2016 2:25 am

Re: Is it possible to do multiple keywords searching?

Post by crimsonlogic »

Hi Support,

I can find the keyword in certain page by using blow code:

Code: Select all

axCoPDFXCview1.RunJavaScript("this.pageNum=" + pageNum + ";");
int iCmdID = 57636; //This is const of "Find" command.
object vDataIn;
object[] vArr = new object[2];
vArr[0] = iCmdID;
vArr[1] = keyword;
vDataIn = vArr;

axCoPDFXCview1.SetProperty("Find.Options.WholeWordsOnly", "True");
axCoPDFXCview1.DoVerb(null, "ExecuteCommand", vDataIn, out vDataOut, 0);
And I want to highlight the keyword.
If I want to call "HighlightSelection" by DoVerb method to highlight the keyword, need to make the keyword selected first, right?
But how to make the keyword as selected text?
User avatar
Vasyl-Tracker Dev Team
Site Admin
Posts: 2352
Joined: Thu Jun 30, 2005 4:11 pm
Location: Canada

Re: Is it possible to do multiple keywords searching?

Post by Vasyl-Tracker Dev Team »

Hi, crimsonlogic.

The using of "Find" command will not help you in your case. You must make the necessary word selected really. The "Find" doesn't select the text but just highlight it temporarily.

Only one solution I see for your problem - look to our TextOperations example. It may help you to develop your own search&highlight mechanism.

Cheers.
Vasyl Yaremyn
Tracker Software Products
Project Developer

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
Post Reply