Click or drag to resize

view Property

Gets a PdfView Class containing information about what portion of the loaded document is now being viewed.

Syntax
JavaScript
this.view;

Property Value

Type: PdfView Class

The view information and state of this PdfWebControlApi Class at the time that the "viewChanged" event is raised.

Remarks

This property is read-only and should not be set to.

Examples
The following example uses the ViewChangedEventArgs Class to handle the "viewChanged" event of the PdfWebControlApi Class.
JavaScript
//declare event handler function (which accepts an object of type ViewChangedEventArgs as an argument)
function viewChangedHandler(evt)
{
    //show current view information
    window.alert("View changed. You are now viewing page #" + evt.view.page + " at " + evt.view.zoom + "%");
}

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

//attach event handler to objectAdded event
myApi.addEventListener("viewChanged", viewChangedHandler);
See Also