getType Method |
Gets a value representing the type of object of this PdfObject instance.
function getType();
None
Type: ObjectType Enumeration
Returns the object type.This method will return the object type of this PDF object.
//declare event handler function (which accepts an object of type ObjectAddedEventArgs as an argument) function objectAddedHandler(evt) { //if this is an image if(evt.obj.getType() == evt.obj.ObjectType.ImageShape) { //display alert window.alert("Image was added!"); } } //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);