/* 
Class:      PdfWebControlApi
Parameters: id  - (string) Element id of a PdfWebControl instance. The ClientID property of the Web Control holds the correct value for use with this parameter.
*/
function PdfWebControlApi(id) 
{
    //find iframe element which contains this instance
    var ele = document.getElementById(id);
    
    //send javascript command to RadPdf to save
    if(ele){
        ele = (ele.contentWindow || ele);
    }

    //set class to rpa one
    if(ele){
        //set this class to be the core WebControl API class
        return ele.rpa;
    }else{
        //instance not found
        //set this class to empty
        return null;
    }
}

/*
SAMPLE JAVASCRIPT USE:
var myApi = new PdfWebControlApi("myID"); //create an instance of the API
myApi.Save(false); //call save

SAMPLE INLINE USE:
(new PdfWebControlApi("myID")).Save(false);
*/