Adjusting Layout JavaScript in Designer
In addition to the zoom factor, you will also need to adjust the layout of your form for the best user experience.
If you would like to adjust the layout on an action or event with JavaScript in LiveCycle Designer you will again need to use a little "AcroScript" (Acrobat based JavaScript as apposed to XFA).
In this example we force the user to go to the next page and then we set a zoom factor of "Page Width" and then the Single Page Continuous. This is one of the better views for filling in a lengthy form as the page does not "jolt" from one page to the next when the user scrolls up and down. At the same time, this view does not provide a hard separation between pages so make sure your form design takes this into mind.
xfa.host.pageDown();
var oDoc = event.target;
oDoc.zoomType = zoomtype.fitW;
oDoc.layout = "OneColumn";
For more detail on the "Layout" capabilities, take a look at the Developing Acrobat Applications Using JavaScript guide.
The most common options are:
oDoc.layout = "SinglePage"; // Provides a good clean break between pages but can be a bit of a jolt between one page and the next
oDoc.layout = "OneColumn"; // Generally a good overall view of a form with smooth scrolling
oDoc.layout = "TwoColumnLeft";
oDoc.layout = "TwoColumnRight";
oDoc.layout = "TwoPageLeft";
oDoc.layout = "TwoPageRight";
Adjusting Zoom with JavaScript in Designer
If you would like to adjust the zoom factor on an action or event with JavaScript in LiveCycle Designer you need to use a little "AcroScript" (Acrobat based JavaScript as apposed to XFA).
In this example we force the user to go to the next page and then we set a zoom factor of "Page Width".
xfa.host.pageDown();
var oDoc = event.target;
oDoc.zoomType = zoomtype.fitW;
For more detail on the "zoomtype" capabilities, take a look at the Adobe® Acrobat® JavaScript Scripting Guide.
The most common options are:
oDoc.zoomType = zoomtype.fitP; // FitPage
oDoc.zoomType = zoomtype.fitW; // FitWidth
oDoc.zoomType = zoomtype.fitH; // FitHeight
oDoc.zoomType = zoomtype.fitV; //FitVisible Width
