Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session

Hide only the left navigation pane (has buttons for layers, paperclip, etc.)

Avatar

Level 9

Is there a script to hide only the left navigation pane containing the buttons (signatures, layers, paperclip, etc)? I can hide it manually by right clicking it and choose "Hide navigation pane buttons".

Thanks

18 Replies

Avatar

Level 9

Radzmar - I tried that script from your other post but it also closes the scroll bar on the right side. I have the scipt under the docReady event:

form1::docReady - (JavaScript, client)

event.target.viewState = {overViewMode:5};

I can close the panel manually that has the bookmarks, layers, paperclip, etc... and it does not close the scroll bar on the right but can't figure out a script that will do that.

Thanks for trying to help.

-Don 

Avatar

Former Community Member

Set it just the way you want manually then run this script in a button click to see what values to use:

var vState = event.target.viewState.toSource();

app.alert(vState );

Avatar

Level 9

Radzmar: I tried:

event.target.viewState = {overViewMode:1};

but no success.

fsb_steve:

Do I type all of this into the docReady event?

ScreenShot.jpg

Thank you both for helping.

-Don

Avatar

Level 9

I am trying to close the black navigation pane that contains the various buttons (paperclip, etc..) with script.

NavigationPane_LeftSide.png

Here are the values when the pane is open

Before.png

These are the values when that navigation pane is closed:

After.png

Please respond if you can help me solve this problem. Thanks

Avatar

Level 10

Ok, here's another suggestion.

There is another method to show/hide panes too, which is undocumented I think.

Avatar

Level 9

Unfortunitly, none of these close the pane I need to close.

-Don

Avatar

Level 10

Do you test this in the PDF-Preview? This doesn't work.

I tested the scripts above in the Acrobat and they worked as expected.

Avatar

Level 9

I plaved the code below in the docready event of form1, saved and opened the form in Acrobat X and the navigation pane was not closed.

event.target.pane = "";

Am I doing something wrong?

Thanks,

~Don

Avatar

Level 10

I have no idea what you're wrong.

Do you have the JavaScript activated in Acrobat?

Avatar

Level 9

radzmar,

Here's a link to an example of the form I am working with and I have the code to minimize the panes in the docReady event of form1

https://acrobat.com/#d=TrdpJl5XxEUM2vhqoMSO0Q

Avatar

Level 10

I'd no problems with your file.

The script did what it should do.

Does it work when you type it into the JS console of Acrobat?

You have to replace "event.target" with "this" in that scenario!

Avatar

Level 9

I'm sorry - I'm not very familiar with how to do that. Do I press Ctl-J? Then how do I enter the code?

Avatar

Level 10

Ok, open Acrobat press Ctrl + J.

The JS Debugger should open, if not it's not active (check Acrobat's preferences Ctrl + K > JavaScript > Enable Acrobat JavaScript + Enable interactive console).

In the Debugger select the console view if it is not already selected.

Below you'll see a window you can type in JavaScripts.

Enter the script and press Ctrl + Return to execute it.

JSConsole.png

Avatar

Level 9

I did what you described and nothing happens. The pane stays open. See the screen shot at the link below. I checked to be sure JavaScript is enabled in Acrobat and it is.

https://acrobat.com/#d=4xRr99CPiJrNEXyuPlohJw

Avatar

Level 10

Maybe I confused things.

this.pane = ""; or this.viewState = {overViewMode:1}; or app.execMenuItem("ShowHideNavigationPane"); minimizes the left pane to the icon view.

this.viewState = {overViewMode:5}; will hide it completly but also the scroll bar.

There seems to be not way to hide the bar but keep the scroll bar active.

Avatar

Level 9

radzmar,

Thanks for trying so hard to help me. I appreciate all your time. Have a good day!