Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Open Bookmark Tab automatically

Status
Not open for further replies.

stfarm

Programmer
May 31, 2001
179
CA
After creating a pdf file in Acrobat 6.0, can I somehow set it up so the Bookmark tab is open when the file loads in the reader.

I have some users that are not familliar with the reader, and they won't click on the bookmark tab.

I hope that's possible.
Thank you,

steve
 
I can't find a user preference setting in Acrobat Reader 6.0 to always have the navigation pane open.

However, you should be able to include a document open JavaScript that executes the View | Navigation | Bookmark menu item.

I don't have my AcroJS reference with me now to give you the exact code or menu name, sorry.

Thomas D. Greer
 
Does anybody else know?? I really need this to work. Maybe somebody knows about that menuitem and javascript?

Thank you.

Steve
 
You have two methods of the App object, execMenuItem and listMenuItems.

To find out the name of the bookmark menu item, you could just iterate through all of the menu items. Here's the code to do that:

Code:
function FancyMenuList(m, nLevel)
{
var s = "";
for (var i = 0; i < nLevel; i++) s += &quot; &quot;;
console.println(s + &quot;+-&quot; + m.cName);
if ( m.oChildren != null )
for ( var i = 0; i < m.oChildren.length; i++ )
FancyMenuList(m.oChildren[i], nLevel + 1);
}
var m = app.listMenuItems();
for ( var i=0; i < m.length; i++ ) FancyMenuList(m[i], 0);

Copy/paste that in your JavaScript console and run it. Look for the menu item for your bookmark.

Once you get the name of the menu item, it's as simple as:

Code:
app.execMenuItem(&quot;Open&quot;);

where in this example, &quot;Open&quot; is the menu name.

Thomas D. Greer
 
It's actually really simple.

File>Document Properties>Initial View.

Under Document Options, from the Show drop-down menu, select Bookmarks Panel and Page. (Make any other selections you want to, such as setting it to always open at 100% magnification.) Click OK. Save your file. When it's next opened in Reader or full Acrobat, the Bookmarks panel will be there.
 
I don't find that menu item in Reader. There isn't a File|Document Properties|Initial View.

But you're right, if there is such a functionality in Acrobat 6.0 (not Reader), then of course he should set that property through the GUI as opposed to writing a document-level JavaScript.

I got sidetracked by being on a machine without Acrobat 6.0! Plus I'm a programmer, so always gravitate toward the programming solutions first!

Thomas D. Greer
 
TashaGoddard thank you very much, that did it. Perfect!
By the way tgreer, you need the full Acrobat version to see the menu item.

Steve
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top