Click or drag to resize

getProperties Method

Gets a value representing all accessible properties for this PdfObject instance.

Syntax
JavaScript
function getProperties();

Parameters

None

Return Value

Type: PdfObjectProperties Class

Returns the given object's properties.

Remarks

Not all properties are supported by all objects. Consult the PdfObjectProperties Properties list for additional information.

This method will return null if an error occurs and the object's properties can not be retreived (as every object supports at least 1 property).

Examples
The following example uses the ObjectEventArgs Class to handle the "objectAdded" event of the PdfWebControlApi Class.
JavaScript
//declare event handler function (which accepts an object of type ObjectAddedEventArgs as an argument)
function objectAddedHandler(evt)
{
    //get object properties
    var props = evt.obj.getProperties();

    //check if the new object is movable
    if(props["movable"])
    {
        window.alert("New object is movable. This is expected.");
    }
}

//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);
See Also