Click or drag to resize

obj Property

Gets a value representing the PDF object added to the currently loaded document.

Syntax
JavaScript
this.obj;

Property Value

Type: PdfObject Class

The PDF object added which caused this event to be raised.

Remarks

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

Examples
The following example uses the ObjectAddedEventArgs Class to handle the "objectAdded" event of the PdfWebControlApi Class.
JavaScript
//get API class
var myApi = new PdfWebControlApi("PdfWebControl1"); // where "PdfWebControl1" is the ID (ClientID) assigned to the PdfWebControl instance

//declare event handler function (which accepts an object of type ObjectAddedEventArgs as an argument)
function objectAddedHandler(evt)
{
    //set object default properties on add
    evt.obj.setProperties( {"color" : "#ff0000"} );
}

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