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

Hide Navigation Panel Buttons?

jdeats
Registered: Jun 20 2007
Posts: 14

The Adobe Acrobat Reader 8 adds Navigation Panel buttons which are by default visible to the left of the viewer area of the .OCX control's UI area when the Acrobat Reader control is embedded in Internet Explorer or any other ActiveX container. These buttons are also visislbe in the stand alone Acrobat 8 reader.

I would like to know if their is a way to programmaticly hide these buttons using JavaScript on an HTML page that has Reader embedded as a plug-in using the tag.

Also, while off topic- I'm curious if there is a way to change the default dark grey background the Acrobat Reader puts around the PDF document in its viewer. Ideally I would like to be able to change this color to white instead.

gkaiseril
Online
Expert
Registered: Feb 23 2006
Posts: 4308
You can use the HTML URL open parameter of "pagemode=none":

http://example.org/doc.pdf#pagemode=none

For more information, you can download the Acrobat SDK documentation or just the PDF Open Options document.

George Kaiser

jdeats
Registered: Jun 20 2007
Posts: 14
Thanks but this isn't what I was looking for... I'm using HTML's tag I'm embedding the Adobe Reader as an ActiveX control on an HTML page and I have a JavaScript method to load the PDF.So I need to be able to disable these buttons from JavaScript.

I do see a pageMode property of the ActiveX control, but when I pass it "none" as a property it doesn't seem to do anything.
gkaiseril
Online
Expert
Registered: Feb 23 2006
Posts: 4308
Just set the PDF's open property to "Page Only" in the idvidual PDFs or use the batch processor in Professional.

George Kaiser

jdeats
Registered: Jun 20 2007
Posts: 14
Thanks again...

Unfortunately that's not a workable solution either. The problem is I don't have control of all the PDF content. The PDF's may come from any number of users. Some may generate them using the Adobe Acrobat mock-print driver, others may use Acrobat Professional 8, while others may have PDF's from various sources.
gkaiseril
Online
Expert
Registered: Feb 23 2006
Posts: 4308
If you have Professional, you can batch process to hide the navigation pane by adding a document level script to hide the navigation pane or additionally the toolbars, or you maybe be able to add it through the JSO with active X or create an FDF file to run the necessary JavaScript when the associated PDF is opened.

George Kaiser

jdeats
Registered: Jun 20 2007
Posts: 14
I do appreciate all your exchanges on this.

Regarding the FDF approach.... If I could access the needed property or method to disable the Navigation panel using JavaScript that would solve the problem. My problem is, according to the IAC documentation there is no method to property to call from JavaScript to disable that. Following the naming convention on the other methods, I can do: setShowToolbar(false); setShowScroolbars(false);

You metioned using #pagemode=none before and while that wasn't what I was looking for it lead me to the PDF open parameters document in the Acrobat 8 SDK This is viewable here:
http://www.adobe.com/devnet/acrobat/pdfs/pdf_open_parameters.pdf

Inside that doc I did find a way, if I were opening the PDF in a browser without the tag I could do what I want like this:http://www.adobe.com/devnet/acrobat/pdfs/pdf_open_parameters.pdf#navpanes=0

Again, the problem is there is no apparent way to manipulate the navigational panes using JavaScript, unless the PDF has been disabled. Since the solution is running on a server I do not want to automate Acrobat Professional from my application to run a batch process, in fact I wouldn't imagine it would be legal to use Acrobat Professional in that manner giving the context.

Following Adobe's IAC method naming convention the method and matching up with what hey provide in "open PDF params" the method should through IAC should be .setShowNavpanes(false); but that method does not exist.
DonaldKerr
Registered: May 14 2009
Posts: 1
I am looking for exactly the same solution, i.e. to have the ability to control (hide/show) "navpanes" programatically using javascript. I am in the fortunate position whereby I am happy to set these values as part of the url - "src" parameter as follows:

function createControl (objectFILENAME) {
PDFObject.outerHTML = ' ';
}

I load the object externally to avoid the "Click to activate this control" message. If you want the full code then please contact me.

Previously, I set the following onLoad (now commented out) - No "navpanes" though:

function doOnLoad() {
// Commented out - Now set in pdfembed.js
// PDFObject.setShowScrollbars(0);
// PDFObject.setShowToolbar(0);
// PDFObject.setPageMode('none');
// PDFObject.setCurrentPage(1);
PDFObject.setLayoutMode('SinglePage');
fitToScr();
document.getElementById('PDFObject').style.width = "100%";
document.getElementById('PDFObject').style.height = "80%";
document.getElementById('PDFObject').style.visibility = "visible";
}

Regards,

Donald