Hi everyone,
Need some help regarding PDF search functions.
Basically the goal is to have a text field on the main form where a user can fill out and hit "search" to look for that text in the document.
"Wait!" you say, "Acrobat already HAS a search function!"
You are correct, but we have to assume our user base has zero experience with acrobat. That's why I need the search field front and centre, in the middle of the page, surrounded by our friendly form.
I have 2 ideas:
Have a textfield and button that populates and activates the search function all in one go. So if I typed in "fruit" in the form, hit my custom "search" button, it would open the search tool, enter "fruit" and search the document automatically. The user would then continue using the search window, now that it's open and they know it's there...don't know if I can do that though through javascript.
Second idea is to somehow use acroexch and the findtext string to create an ad-hoc search within the document itself, bypassing the native search feature. Seems like a shame to NOT use the search function that's already built into acrobat, but if it means the customer will use it...
If anyone has any code they can share, or any other ideas on how to approach this issue, I'd be most grateful. Thanks for your support!
D.
search.query("What We Want To Search For", "ActiveDoc");
You can set the various properties of the search object to affect case-sensitivity, etc.
But to be honest, I think this is ridiculous. Teaching your users how to use the built-in search function is a much better solution, and will probably take you much less time and effort to implement.
- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com