deleteObject Method |
Deletes the object represented by this PdfObject instance.
function deleteObject();
None
Type: Boolean
true if operation completed successfully; otherwise, false.Not all objects can be deleted (e.g. Deletable is false).
//declare event handler function (which accepts an object of type ObjectAddedEventArgs as an argument) function objectAddedHandler(evt) { //delete the new object evt.obj.deleteObject(); } //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);