$box = new Rectangle(); $box->x = F3::get('POST["boxX"]'); $box->y = F3::get('POST["boxY"]'); $box->width = 0; $box->height = 0; $point = new Point(); $point->x = 0; $point->y = 0; $annotationInfo->box = $box; $annotationInfo->annotationPosition = $point; } F3::set('userId', $clientId); F3::set('privateKey', $privateKey); F3::set('fileId', $fileId); try { $createAnnotation = $antApi->CreateAnnotation($clientId, $fileId, $annotationInfo); if ($createAnnotation->status == "Ok") { if ($createAnnotation->result) { //Generation of iframe URL using fileGuId if ($basePath == "https://api.groupdocs.com/v2.0") { $iframe = 'http://apps.groupdocs.com/document-annotation2/embed/' . $createAnnotation->result->documentGuid . '?frameborder="0" width="720" height="600"'; //iframe to dev server } elseif ($basePath == "https://dev-api.groupdocs.com/v2.0") { $iframe = 'http://dev-apps.groupdocs.com/document-annotation2/embed/' . $createAnnotation->result->documentGuid . '?frameborder="0" width="720" height="600"'; //iframe to test server } elseif ($basePath == "https://stage-api-groupdocs.dynabic.com/v2.0") { $iframe = 'https://stage-apps-groupdocs.dynabic.com/document-annotation2/Embed/' . $createAnnotation->result->documentGuid . '?frameborder="0" width="720" height="600"'; //Iframe to realtime server } elseif ($basePath == "http://realtime-api.groupdocs.com") { $iframe = 'http://realtime-apps.groupdocs.com/document-annotation2/embed/' . $createAnnotation->result->documentGuid . '?frameborder="0" width="720" height="600"'; }