Is it possible to do multiple keywords searching?

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

Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange

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
You do not have the required permissions to view the files attached to this post.
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19913
Joined: Mon Jan 12, 2009 8:07 am

Re: Is it possible to do multiple keywords searching?

Post by Stefan - PDF-XChange »

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 - PDF-XChange
Site Admin
Posts: 2448
Joined: Thu Jun 30, 2005 4:11 pm

Re: Is it possible to do multiple keywords searching?

Post by Vasyl - PDF-XChange »

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.
PDF-XChange Co. LTD (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 - PDF-XChange
Site Admin
Posts: 2448
Joined: Thu Jun 30, 2005 4:11 pm

Re: Is it possible to do multiple keywords searching?

Post by Vasyl - PDF-XChange »

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.
PDF-XChange Co. LTD (Project Developer)

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