If so you can download any of the below versions for testing. The product will function as normal except for an evaluation limitation. At the time of purchase we provide a license file via email that will allow the product to work in its full capacity. If you would also like an evaluation license to test without any restrictions for 30 days, please follow the directions provided here.
If you experience errors, when you try to download a file, make sure your network policies (enforced by your company or ISP) allow downloading ZIP and/or MSI files.

Installation
The package is available at Packagist and it can be installed via Composer by executing following command:
composer require groupdocscloud/groupdocs-viewer-cloud

Requirements
- PHP 8.1 or later
- Composer
- PHP extensions — curl, json, mbstring
- GroupDocs Cloud credentials — Client ID and Client Secret from the Dashboard
Dependencies
The SDK requires the following packages:
| Package | Constraint |
|---|
| guzzlehttp/guzzle | ^6.5.8 or ^7.4.5 |
| ext-curl | * |
| ext-json | * |
| ext-mbstring | * |
Quick Start
Get your API credentials
To use GroupDocs.Viewer Cloud, sign up at GroupDocs.Cloud Dashboard and get your Client ID and Client Secret.
Initialize the API
Use the following code to start using the GroupDocs.Viewer Cloud SDK for PHP:
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Get your ClientId and ClientSecret at https://dashboard.groupdocs.cloud
$configuration = new GroupDocs\Viewer\Configuration();
$configuration->setAppSid("YourClientId");
$configuration->setAppKey("YourClientSecret");
$configuration->setApiBaseUrl("https://api.groupdocs.cloud");
$viewApi = new GroupDocs\Viewer\ViewApi($configuration);
See the full example in Utils.php.
Convert and download a document (direct, no cloud storage)
Once initialized, use this basic example to convert a local document to JPG and receive the result directly.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
use GroupDocs\Viewer\Model\Requests;
$configuration = new GroupDocs\Viewer\Configuration();
$configuration->setAppSid("YourClientId");
$configuration->setAppKey("YourClientSecret");
$configuration->setApiBaseUrl("https://api.groupdocs.cloud");
$viewApi = new GroupDocs\Viewer\ViewApi($configuration);
$format = "jpg";
$filePath = __DIR__ . "/sample.docx";
$request = new Requests\convertAndDownloadRequest($format, $filePath);
$result = $viewApi->convertAndDownload($request);
echo "Document converted: " . $result->getSize() . "\n";
See the full example in ConvertAndDownload.php.
Render a Document with Responsive HTML
This example renders a Word document from cloud storage as responsive HTML.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
use GroupDocs\Viewer\Model;
use GroupDocs\Viewer\Model\Requests;
$configuration = new GroupDocs\Viewer\Configuration();
$configuration->setAppSid("YourClientId");
$configuration->setAppKey("YourClientSecret");
$configuration->setApiBaseUrl("https://api.groupdocs.cloud");
$viewApi = new GroupDocs\Viewer\ViewApi($configuration);
$viewOptions = new Model\ViewOptions();
$fileInfo = new Model\FileInfo();
$fileInfo->setFilePath("SampleFiles/sample.docx");
$viewOptions->setFileInfo($fileInfo);
$viewOptions->setViewFormat(Model\ViewOptions::VIEW_FORMAT_HTML);
$renderOptions = new Model\HtmlOptions();
$renderOptions->setIsResponsive(true);
$viewOptions->setRenderOptions($renderOptions);
$request = new Requests\createViewRequest($viewOptions);
$response = $viewApi->createView($request);
echo "Responsive HTML rendered: " . count($response->getPages()) . "\n";
See the full example in HtmlViewerResponsiveLayout.php.
Render Selected Pages
This example renders only pages 1 and 3.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
use GroupDocs\Viewer\Model;
use GroupDocs\Viewer\Model\Requests;
$configuration = new GroupDocs\Viewer\Configuration();
$configuration->setAppSid("YourClientId");
$configuration->setAppKey("YourClientSecret");
$configuration->setApiBaseUrl("https://api.groupdocs.cloud");
$viewApi = new GroupDocs\Viewer\ViewApi($configuration);
$viewOptions = new Model\ViewOptions();
$fileInfo = new Model\FileInfo();
$fileInfo->setFilePath("SampleFiles/sample.docx");
$viewOptions->setFileInfo($fileInfo);
$viewOptions->setViewFormat(Model\ViewOptions::VIEW_FORMAT_HTML);
$renderOptions = new Model\HtmlOptions();
$renderOptions->setPagesToRender([1, 3]);
$viewOptions->setRenderOptions($renderOptions);
$request = new Requests\createViewRequest($viewOptions);
$response = $viewApi->createView($request);
echo "Selected pages rendered: " . count($response->getPages()) . "\n";
See the full example in RenderSelectedPages.php.
Retrieve the supported file formats.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$configuration = new GroupDocs\Viewer\Configuration();
$configuration->setAppSid("YourClientId");
$configuration->setAppKey("YourClientSecret");
$configuration->setApiBaseUrl("https://api.groupdocs.cloud");
$infoApi = new GroupDocs\Viewer\InfoApi($configuration);
$response = $infoApi->getSupportedFileFormats();
echo "Number of formats = " . count($response->getFormats()) . "\n";
See the full example in GetSupportedFormats.php.
Examples on GitHub
The GroupDocs.Viewer Cloud PHP Examples repository includes ready-to-run examples covering:
| Category | Examples |
|---|
| Basic Usage | Supported formats, document info, attachments, convert and download |
| HTML Viewer | Responsive layout, minify HTML, exclude fonts, limit image size, optimize for printing |
| Image Viewer | Adjust image size, JPG quality, text overlay, text coordinates |
| PDF Viewer | Protect PDF, adjust JPG quality |
| Common Rendering Options | Watermarks, flip and rotate pages, comments, consecutive pages, hidden pages, notes, selected pages, custom fonts, reorder pages, replace missing font |
| Loading Options | Protected documents, specify encoding |
| Rendering by File Type | Archive, CAD, email, Lotus Notes, MS Project, Outlook, PDF, spreadsheet, text, Visio, Word |
How to run the examples
- Clone or download the examples repository
- Edit
Examples/Utils.php and set your Client Id and Client Secret - Go to the
Examples directory - Run
composer update - Execute
php RunExamples.php
For more details, visit Getting Started.

Document Rendering API | PHP Cloud API | GroupDocs.Viewer Cloud | REST API | HTML Rendering | PDF Conversion | Image Rendering | Document Viewing | Multi-Page Rendering | Document Streaming | CAD Rendering | E-Mail Message Rendering | Visio Rendering | MS Project Rendering | Outlook Data Rendering | Spreadsheet Rendering | Word Processing Rendering | Custom View Options | Responsive HTML | Attachment Rendering | Secure API Access | Cloud Storage Integration