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

" Dropdown"- Menu to navigate inside a Pdf-file???

TryHarder
Registered: Jun 2 2008
Posts: 15

Hello to all,
first of all I`m very new to the community and also to Acrobat - so forgive me, if this matter of subject has been discussed a million times. But I did an extensive search and somehow nothing came up wich was comfortable with my needs.
I`m looking to Acrobat as a designer, so basically I would like to navigate inside a document (open different pages) in an easy but also elegant way.
So, is there a “DropDownMenue”“Java Script” out there, which alows me to access different pages inside my (single) pdf-document.

Thank you in advance for all your help and suggestions.

Martin

My Product Information:
Acrobat Standard 8.0, Windows
jbfreels
Registered: Feb 19 2008
Posts: 63
You could create a standard Acrobat form that had a drop-down menu or a listbox populated with entries that tied to different pages within your PDF. It's not trivial though, for a JavaScript beginner.

[url=http://www.adobe.com/devnet/acrobat/pdfs/js_api_reference.pdf]Acrobat JS API Reference[/url]
Dimitri
Expert
Registered: Nov 1 2005
Posts: 1389
Hi Martin,

You could use a "popup menu" as a navigation tool and connect the entries to bookmarks you create for each page of the PDF. See this article at JavaScript Corner for a discussion and example file-
http://www.acrobatusers.com/tutorials/2007/js_popup_menus/

More exmaples can be found at this web page which includes many rich media PDFs that use this type of navigation-
http://www.pdfpictures.com/ebrochures.php

As pointed out by jbfreels, this is not a trivial task and requires some skill with Acrobat JavaScript.

But, a fairly easy way to add navigation to PDFs is to use the Boookmark tool in Acrobat- this is fairly straighforward and instructions can be found in Acrobat's Help file- just do a search for "Bookmark." Maybe not as elegant, but definitely functional.

Hope this helps,

Dimitri
WindJack Solutions
www.windjack.com
TryHarder
Registered: Jun 2 2008
Posts: 15
Dimitri, I would like to thank you for your information.
I`ve tried your link to "Thom Parker" and found it very helpful.
But as I`m a beginner, I would like to ask you again, how do I link the single "menue points" to defined pages inside a PDF-document?

I mean, lets say a have Pdf-document containing six pages. So I would use this "DropDownMenu" looking like this: Click on lets say "Index", then would appear lets say "Lookbook" and then I would like to access the pages from one to six.
What would the code look like? Is there a single line of code missing in Thom Parkers Script?

Sorry for asking again. Please excuse my English.

Martin
lnail
Registered: Apr 18 2008
Posts: 51
TryHarder,

I have in the past used "Destinations" for my drop down menus.

I create a Destination for each page or page view that I want to link to, and then create the drop-down menus to link to the destination.

If no one else has, I will try to post the JS sometime tomorrow or this weekend.

L Nail

YES! I can do that.

TryHarder
Registered: Jun 2 2008
Posts: 15
Inail,
this would be great, looking very much forward.
Thank you advance for your input.
Martin




lnail wrote:
TryHarder,I have in the past used "Destinations" for my drop down menus.

I create a Destination for each page or page view that I want to link to, and then create the drop-down menus to link to the destination.

If no one else has, I will try to post the JS sometime tomorrow or this weekend.

L Nail
lnail
Registered: Apr 18 2008
Posts: 51
Martin,

[b]First:[/b] Go to each page, set the page view that you want the end-user to view the page as, and create a "Destination" for the page. (<-- View -> Navigation Panels -> Destinations, then Options -> New Destination). Create all of the Destinations that you want to create links for in your menu.[b]Second:[/b] Go to Advanced -> Document Processing -> Document Javascripts..., then type in a script name, I chose "NavigateMenu" (without the quotes), and click on "Add". In the proceeding window use the following code, adjusted to your needs.[color=#FF0000][b][i]**NOTE**[/b] - Exact spelling and case of the Destination name is required when entering it in the script. Destinations must be in quotes, but CAN have spaces in its name if you have a space in the Destination name. A hypen (-) in quotes can be used for a separator. Start a Sub-Menu within brackets [ ]; the first name will be the name of your sub-menu. It does NOT have to be a destination, NOR if you use a destination will it link to it.[/i][/color]

---

function NavigateMenu()
{
var cDest = app.popUpMenu("Destination_1", "-", "Destination_2", ["Name_Of_SubMenu", "Destination_3", "Destination_4"], "-", "Destination_5");

this.gotoNamedDest(cDest)
}

---

[b]Third:[/b] Create a button on your page. In the button's properties, click on the "Actions" tab. Choose your "Trigger", select "Run a JavaScript", and click "Add". In the JavaScript window that opens, enter "NavigateMenu()" or whatever you name it.

[b]Fourth:[/b] You can right-click on the button and duplicate it to other pages if you desire.


Hope this helps.

LNail

P.S. My actual script links to over 40 pages, so there is quite a few Destinations and plenty of sub-menus to organize it all. It is quite scalable, in my opinion, and works wonderfully and efficiently.

YES! I can do that.

TryHarder
Registered: Jun 2 2008
Posts: 15
Inail,
just let me send you a big "Thank you"! for your exellent and detailed explanation. It works wonderfully.
That is, what I was looking for - you see, - I`m a not a "Java-expert"- not even a beginner.

To tune the "PDf-file", is there a "small java-script-extension" to put into your script giving options to change the color of the "popup-menus"- and is there let`s say a "Major-Java-Script" which would disable document-scrolling by "mouse" and "keys". In my opinion, this would greatly enhance a "controlled" "design-experience".

Again, let me thank you for your time and help.

Greetings from Berlin, Martin
visualine
Registered: Feb 17 2009
Posts: 1
This is a very late entry ... but I cannot get any joy out of Adobe and I am desperate .... I have used the navigate menu kindly described above by lnail and am experiencing a very odd result ... the menu works perfectly but pages in the pdf display at a different zoom scale when accessed through the java menu ... Only when scrolled via mouse or other hyper-link the page zoom remains constant. Has anyone else had this problem ??? or is it a bug in Acrobat 9. My document was created in Indesign CS4.

thanks for any help.
lnail
Registered: Apr 18 2008
Posts: 51
Visualine,

As you create your destination, make sure that your page is set at the proper Zoom level when creating the destination. This is a feature, as you may want to focus on specific areas of your page. You could have several destinations on a single page (i.e. Anchors on a web page).

Go to your Destinations tab, click on the Destination that is set improperly, resize your page to "Fit Page", and then under the Destinations tab, right-click on the Destination name, and click "Set Destination".

Hope this helps.

lnail

YES! I can do that.

Demir
Registered: Apr 20 2009
Posts: 10
This is fantastic - its helped me out a great deal too.
Many thanks.
Is there a way of changing the appearance of the menu created, so it matches colours of the document
lnail
Registered: Apr 18 2008
Posts: 51
Demir,

I am unaware of a way to change the appearance of the Drop-down menu. However, should you come across a way to do this, I too would be interested in knowing.

Glad I could be of help.

lnail

YES! I can do that.

try67
Expert
Registered: Oct 30 2008
Posts: 2398
It's not possible to change the look of the drop-down menu, but instead of using it you can use a drop-down box from the Forms tools, which can be customized (a bit).

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com

adamhewison (not verified)
thanks try67. that is very slick!! I did what you suggested and it worked beautifully.





------------------------------------------------------------------------------------------------------------------------------
[url=http://www.optionsoutlet.com/hosting/Hostgator_webhosting_coupon.php]hostgator coupon[/url]