Hi,
I really like the Find/Find Next feature you have where the user can input some text similar to a Ctrl+F and continually hit Enter to Find the Next instance of the text.
Does the viewer expose any functionality that I can call via code (.NET) to do the same thing? I'd like to build my own textbox (so I have control as to what goes in there) and call your function to Find/Find Next the text in the document since you hightlight the text, reposition, etc...
Do you have any code that can do that?
Thanks,
Dax
Simulate Find Feature
Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange
-
- Site Admin
- Posts: 19885
- Joined: Mon Jan 12, 2009 8:07 am
Re: Simulate Find Feature
Hello Dax,
You could call the "Find Next" end user command (ID:32992) and this will find the next occurrence of your search text.
Best,
Stefan
You could call the "Find Next" end user command (ID:32992) and this will find the next occurrence of your search text.
Best,
Stefan
-
- User
- Posts: 5
- Joined: Mon Nov 07, 2011 11:45 pm
Re: Simulate Find Feature
Hi Stefan,
That sounds great but I can't get it to work in VB. Here is the code. Can you help?
pdfViewer.SetProperty("Search.What.Text", <TextToFind>,0)
pdfViewer.DoVerb("","ExecuteCommand","FindNext",0,0)
Thanks,
Dax
That sounds great but I can't get it to work in VB. Here is the code. Can you help?
pdfViewer.SetProperty("Search.What.Text", <TextToFind>,0)
pdfViewer.DoVerb("","ExecuteCommand","FindNext",0,0)
Thanks,
Dax
-
- Site Admin
- Posts: 19885
- Joined: Mon Jan 12, 2009 8:07 am
Re: Simulate Find Feature
Hello Dax,
You are setting the text for the Advanced search pane with Search.What.Text, and then calling the FindNext - which is executing the simple search in our Viewer.
You need to either Specify the Find.Text - and then call the FindNext, or specify Search.What.Text and then call "StartFullSearch" - and "StopFullSearch" - to stop the advanced search's execution (as it could take some time for complex/longer documents).
Best,
Stefan
Tracker
You are setting the text for the Advanced search pane with Search.What.Text, and then calling the FindNext - which is executing the simple search in our Viewer.
You need to either Specify the Find.Text - and then call the FindNext, or specify Search.What.Text and then call "StartFullSearch" - and "StopFullSearch" - to stop the advanced search's execution (as it could take some time for complex/longer documents).
Best,
Stefan
Tracker