getPage Method |
Gets a value representing the parent PdfPage Class of this PdfObject instance.
function getPage();
None
Type: PdfPage Class
Returns the parent page.This method will return the parent page of this PdfObject Class.
//declare event handler function (which accepts an object of type ObjectAddedEventArgs as an argument) function objectAddedHandler(evt) { //declare object properties to set var props = { "top" : 0, //set to top "height" : evt.obj.getPage().getHeight() //set height to height of page }; //set properties evt.obj.setProperties(props); } //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("objectAdded", objectAddedHandler);