These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Force "Full Acrobat Search" to Nav. Panel at all times (on-/offline)

cushlomockree
Registered: Aug 14 2008
Posts: 13

Hi,
I'm trying to make things a little more user friendly.
I have large pdf's which almost always use Full-text seach vs "Find" to locate data.
I'm using Acrobat 9 Pro.
When I access full text search for an embedded index on my local machine, I have to click on the drop-down menu of the Find box in the top button bar or use the CRTL+SHIFT +F keys. Even then a separate window opens outside the Reader..(very annoying).

However when I open "JavaScript™ for Acrobat® API Reference" at http://www.adobe.com/devnet/acrobat/pdfs/js_api_reference.pdf, the Binocular icon is in the Navigation Panel buttons. The Search window also opens inside the Nav Panel. (when running inside IE7).

I want to force this behavior when users open the PDF off-line.
Is this an undiscovered option or programmable in JavaScript?
Thanks

My Product Information:
Acrobat Pro 9.0, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
The configuration of the toolbar buttons in Acrobat 9 is saved on your local system for every document that's opened. So, if a button was availible when Acrobat 9 first opened the file, it will be there everytime until you save and close the file with a different toolbar configuration. It's not an option in the PDF.

You can control the "Search" window to a certain extent using JavaScript. There are two main ways to do this, the JavaScript Search Object (look in the reference), and by executing the search menu items with "app.execMenuItem()".

Hope this helps,
Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]

The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/javascript.php]http://www.adobe.com/devnet/acrobat/javascript.php[/url]

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

cushlomockree
Registered: Aug 14 2008
Posts: 13
Thanks for your reply,
I'm new to pdf, not to javascript and html, c++ etc.
I don't want to write code if it's not required.

Is there a way to:

A: make the the "find box" in the toolbar default to Full-text Search?( If so, How?)
B: How is the Full-text-Search icon appearing in The Nav panel buttons when I open http://www.adobe.com/devnet/acrobat/pdfs/js_api_reference.pdf?

If "A" isn't possible, how was "B" accomplished (Search is not an option when you right-click in the Navigation Panel buttons area).

I'm really just trying to reproduce behavior I've already seen.
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
I already explained "B", you can't control the toolbar buttons with a document property or script.

And as for "A", you can't control this either, at least not in the user interface.

But, you can put a search button on your PDF that will execute the search any way you want. Unfortunately this requires scripting the "Search" object. Take a look at this object in the Acrobat JavaScript Reference. There are examples on how to use it.

Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]

The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/javascript.php]http://www.adobe.com/devnet/acrobat/javascript.php[/url]

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

cushlomockree
Registered: Aug 14 2008
Posts: 13
OK. I think I'm starting to see what's going on.
Sorry for the confusion.
Any pdf I open in browsers (IE, FF, Opera) that rely on preinstalled dll's (such as AcroIEHelper.dll , AcroIEFavClient.dll) to display content, shows the Full-Text Search Icon and Search Panel in the Navigation area.
When I open the same pdf in a local reader (Acrobat.exe), Full-Text Search is not an option in the Nav. area.
So it's hard-coded that way for in-browser use.

If I understand you correctly, I can implement a button that accesses the search object to replicate something like what I'm seeing in the browsers.

If I were to do this, would I be able to "sniff" if I'm in a browser vs. a local reader so I can determine if the button is needed?

Thanks
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Sorry I didn't say anything about the browser, but yes, the browser plug-in for PDF acts a bit differently than the full Reader or Acrobat. And it works differently on different versions of Acrobat.

And yes, you can tell when the PDF is displayed in the browser with the "doc.external" property.

You could have a document level scripts that does something like this.
if(this.external){this.getField("MyDoSearch").hidden = false;this.getField("MySearchTxt").hidden = false;}

where the search button is called "MySearch". To implement a search button you'll also need to include a text input field, "MySearchText" in the code.

Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]

The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/javascript.php]http://www.adobe.com/devnet/acrobat/javascript.php[/url]

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

cushlomockree
Registered: Aug 14 2008
Posts: 13
Thanks Thom!