Skip to main content
Inspiring
January 6, 2022
Question

Acrobat Pro Navigation Pane Settings

  • January 6, 2022
  • 2 replies
  • 6926 views

Hello,

Can someone please tell me how to change the navigation pane settings for a specific PDF file.

For example, I have some PDF's that display a navigation pane on the left when I open them. I also have some PDF's that do not display a navigation pane on the left when I open them.

 

I need to make them all the same way by either removing the navigation pane to some or by adding a navigation to some. Please tell me how to do this.

 

Please see pictures below. Thank you,

This topic has been closed for replies.

2 replies

Thom Parker
Community Expert
Community Expert
January 9, 2022

Yes, the navigation pane can be controlled with JavaScript, although it is not documented, and not all setting are available. 

So to do this you need to experiment with the "doc.viewState" property to see what works.  

 

First, open a PDF and setup the navigation pane. 

Then run this code in the cosole window:

( you'll find a tutoial here on the console window - https://www.pdfscripting.com/public/Free_Videos.cfm#JSIntro)

 

this.veiwState.toSource(); 

 

If the pages panel is open you'll see something like this:

({ocgStates:null, overViewMode:2, overViewPos:240, overViewX:0, overViewY:0, pageViewLayoutMode:1, pageViewPageNum:0, pageViewX:-161, pageViewY:0, pageViewZoom:3.231109619140625, pageViewZoomType:1})

 

overViewMode and overViewPos indicate the navigation panel displayed and the width of the panel.   

 

Put this code in a document script to setup the viewState when the document is opened. 

 

this.viewState = {overViewMode:2, overViewPos:240};

 

All this and more is explained in this article (paid for content)

https://www.pdfscripting.com/members/Document-Navigation-using-View-States.cfm

 

 

 

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
Inspiring
August 12, 2022

thanx

Inspiring
January 6, 2022

Inspiring
January 6, 2022

Anyone out there?

Dave Creamer of IDEAS
Community Expert
Community Expert
January 6, 2022

Change your document properties and view. Then try saving and securing the PDF.

David Creamer: Community Expert (ACI and ACE 1995-2023)