setMode Method |
Set the mode currently being used in the PdfWebControl instance.
function setMode(mode, key);
mode
Type: Mode Enumeration The mode to activate for use in this PdfWebControlkey
Type: String Object data key for use with a PdfIntegrationProvider which implements the ProcessObjectDataRequest method. Not all modes made use of this parameter. At this time, only "InsertImageShape" optionally uses it (if a key is provided, ProcessObjectDataRequest is queried; if not, the client is prompted for upload).Type: Boolean
true if successful; otherwise, false.This method will return false if the mode is invalid.
Set text selection mode:
var myApi = new PdfWebControlApi("PdfWebControl1"); // where "PdfWebControl1" is the ID (ClientID) assigned to the PdfWebControl instance myApi.setMode(myApi.Mode.SelectText); //use text selection tool
Activate image tool with server side image:
var myApi = new PdfWebControlApi("PdfWebControl1"); // where "PdfWebControl1" is the ID (ClientID) assigned to the PdfWebControl instance myApi.setMode(myApi.Mode.InsertImageShape, "myImageKey"); //set image tool using object key which is passed to ProcessObjectDataRequest
Activate image tool with browser upload:
var myApi = new PdfWebControlApi("PdfWebControl1"); // where "PdfWebControl1" is the ID (ClientID) assigned to the PdfWebControl instance myApi.setMode(myApi.Mode.InsertImageShape); //set image tool