Click or drag to resize

getView Method

Get the view state (page visible, scroll, side panel, form highlighting, zoom level, etc) for the PdfWebControl instance.

Syntax
JavaScript
function getView();

Parameters

None

Return Value

Type: PdfView Class

Returns a JavaScript object representing the current view state.

Remarks

This method will return an object whose members can be changed; however any changes made will not affect the object until the setView Method is called.

Examples
JavaScript
var myApi = new PdfWebControlApi("PdfWebControl1"); // where "PdfWebControl1" is the ID (ClientID) assigned to the PdfWebControl instance

//get current view
var myView = myApi.getView();

//show current view information
window.alert("View changed. You are now viewing page #" + myView.page + " at " + myView.zoom + "%");
See Also