Click or drag to resize

setProperties Method

Sets a value representing a data object containing one or more property values for this PdfObject instance.

Syntax
JavaScript
function setProperties(props);

Parameters

props

Type: PdfObjectProperties Class

The object properties to set.

Return Value

Type: Boolean

true if operation completed successfully; otherwise, false.

Remarks

Not all properties are supported by all objects. Properties specified not supported by a particular object will be ignored. Consult the PdfObjectProperties Properties list for additional information.

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)
{
    //make the new object unmovable
    evt.obj.setProperties({"movable" : false});
}

//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