PHP code example of groupdocscloud / viewer-sdk-php
1. Go to this page and download the library: Download groupdocscloud/viewer-sdk-php library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
groupdocscloud / viewer-sdk-php example snippets
O: Get your AppSID and AppKey at https://dashboard.groupdocs.cloud (free registration is -XXXX-XXXX-XXXXXXXXXXXX");
$configuration->setAppKey("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");
$infoApi = new GroupDocs\Viewer\InfoApi($configuration);
try {
$response = $infoApi->getSupportedFileFormats();
foreach ($response->getFormats() as $key => $format) {
echo $format->getFileFormat() . " - " . $format->getExtension(), "\n";
}
} catch (Exception $e) {
echo "Something went wrong: ", $e->getMessage(), "\n";
PHP_EOL;
}
php composer.phar install
./vendor/bin/phpunit