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

Set zoom level of current page

robsox128
Registered: Apr 29 2009
Posts: 16

Hello,

I'm pretty new to JavaScript so this may be a simple question.

I have a fairly large document (two-up, cover page) that has zoom-in and zoom-out icons (on separate layers) and would like to simplify the processing.

All zoom-in buttons could either go to a predetermined zoom level on the current page or change the view to single page, fit width and turn the visibility of the zoom-in layer off and the zoom-out layer on.

All zoom-out buttons will restore the two-up, cover view and fit width and also restore the visibility of the zoom-in layer and turn off the zoom out layer.

The question is, could this be done in a document JavaScript defining the 2 functions and called by the buttons?

Thanks in advance for any help,

Rob

My Product Information:
Acrobat Pro Extended 8.1
robsox128
Registered: Apr 29 2009
Posts: 16
I have been able to get most of the functionality I need but am still having a problem.

When switching between two-up (TwoPageRight) and single page views from a button on a right hand page the left hand page is always shown even though the page number si displayed correctly. As an example, if a button the right hand page (page 5) is clicked, page 4 is shown in single page view even though page number 5 is being displayed in the navigation bar.

I have also tried just changing the zoom level but the view sets to the middle of the spread when the right side page is clicked.

is there anyway to get the right hand page to display without manually setting the page number?

here is the script I'm using:

function toggleZoom()
{
var docLayout = this.zoom;

if (docLayout == "SinglePage")
{

this.layout ="TwoPageRight";
this.zoomType = zoomtype.fitP;
}
else
{

this.layout ="SinglePage";
this.zoomType = zoomtype.fitW;

}

}

Thanks,
Rob