Ejemplo n.º 1
0
    F3::set('error', $error);
} else {
    F3::set('userId', $clientId);
    F3::set('privateKey', $privateKey);
    $iframeType = F3::get('POST["iframeType"]');
    F3::set("iframeType", $iframeType);
    //Get base path
    $basePath = F3::get('POST["basePath"]');
    //Get entered by user data
    $fileGuId = "";
    $url = F3::get('POST["url"]');
    $file = $_FILES['file'];
    $fileId = F3::get('POST["fileId"]');
    //###Create Signer, ApiClient and Storage Api objects
    //Create signer object
    $signer = new GroupDocsRequestSigner($privateKey);
    //Create apiClient object
    $apiClient = new APIClient($signer);
    //Create Storage Api object
    $storageApi = new StorageApi($apiClient);
    //Check is user entered base path
    if ($basePath == "") {
        //If base base is empty seting base path to prod server
        $basePath = 'https://api.groupdocs.com/v2.0';
    }
    //Set base path
    $storageApi->setBasePath($basePath);
    //Check if user choose upload file from URL
    if ($url != "") {
        //Upload file from URL
        try {
Ejemplo n.º 2
0
$basePath = F3::get('POST["basePath"]');
//Check if all requered data is entered
if (empty($clientId) || empty($privateKey) || empty($firstEmail) || empty($firstName) || empty($secondEmail)) {
    $error = 'Please enter all required parameters';
    F3::set('error', $error);
} else {
    if (empty($lastName)) {
        $lastName = "Empty Last name";
    }
    if ($basePath == "") {
        //If base base is empty seting base path to prod server
        $basePath = 'https://api.groupdocs.com/v2.0';
    }
    //###Create GroupDocs Api objects
    //Create signer object
    $signer = new GroupDocsRequestSigner($privateKey);
    //Create apiClient object
    $apiClient = new APIClient($signer);
    //Create Doc Api object
    $docApi = new DocApi($apiClient);
    //Create Storage Api object
    $storageApi = new StorageApi($apiClient);
    //Create AsyncApi object
    $AsyncApi = new AsyncApi($apiClient);
    //Create MergeApi object
    $mergApi = new MergeApi($apiClient);
    //Create SignatureApi object
    $signature = new SignatureApi($apiClient);
    //Set base path for all Apis
    $docApi->setBasePath($basePath);
    $storageApi->setBasePath($basePath);
Ejemplo n.º 3
0
 $document = new SignatureSignDocumentDocumentSettingsInfo();
 $document->name = $fiDocument["name"];
 $document->data = "data:" . $fiDocument["type"] . ";base64," . base64_encode($docContent);
 //Create SignatureSignDocumentSignerSettings object
 $signer = new SignatureSignDocumentSignerSettingsInfo();
 $signer->placeSignatureOn = 1;
 $signer->name = $fiSignature["name"];
 $signer->data = "data:" . $fiSignature["type"] . ";base64," . base64_encode($signatureContent);
 $signer->height = 40;
 $signer->width = 100;
 $signer->top = 0.83319;
 $signer->left = 0.72171;
 $signer->email = "*****@*****.**";
 //###Create Signer, ApiClient and Storage Api objects
 //Create signer object
 $signature = new GroupDocsRequestSigner($privateKey);
 //Create apiClient object
 $apiClient = new APIClient($signature);
 //Create Storage Api object
 $signatureApi = new SignatureApi($apiClient);
 //Create AsyncApi object
 $asyncApi = new AsyncApi($apiClient);
 //Check if user entered base path
 if ($basePath == "") {
     //If base base is empty seting base path to prod server
     $basePath = 'https://api.groupdocs.com/v2.0';
 }
 //Set base path
 $signatureApi->setBasePath($basePath);
 $asyncApi->setBasePath($basePath);
 //Create setting variable for signature SignDocument method
Ejemplo n.º 4
0
    $error = 'Please enter all required parameters';
    F3::set('error', $error);
} else {
    //Get base path
    $basePath = F3::get('POST["basePath"]');
    //Get entered by user data
    $fileGuId = F3::get('POST["fileId"]');
    $url = F3::get('POST["url"]');
    $file = $_FILES['file'];
    F3::set('userId', $clientId);
    F3::set('privateKey', $privateKey);
    F3::set('email', $email);
    F3::set('firstName', $firstName);
    F3::set('lastName', $lastName);
    // Create signer object
    $signer = new GroupDocsRequestSigner($privateKey);
    // Create apiClient object
    $apiClient = new ApiClient($signer);
    // Create Annotation object
    $antApi = new AntApi($apiClient);
    //Create Storage Api object
    $storageApi = new StorageApi($apiClient);
    //Create MgmtApi object (this class allow manipulations with User account)
    $mgmtApi = new MgmtApi($apiClient);
    if ($basePath == "") {
        //If base base is empty seting base path to prod server
        $basePath = 'https://api.groupdocs.com/v2.0';
    }
    //Build propper basePath
    if (substr($basePath, -3) != "2.0") {
        if (substr($basePath, -1) != "/") {