GroupDocs.Viewer Cloud is an enterprise-grade REST API for high-fidelity document viewing and rendering. Integrate preview of Word, Excel, PowerPoint, PDF, CAD, Visio, email, images, and more into web, mobile, or desktop applications with no third-party software — render to HTML, image, or PDF.
SDKs are grouped by platform. Each example converts and downloads a document (Word → JPG) using the Convert and download document API — no cloud storage required. The same call is shown first as plain REST (cURL), then for each SDK.
Call the Viewer Cloud REST API directly (no SDK). Obtain a JWT from the token endpoint (client_credentials), then convert and download:
# Get JWT (Client Id / Client Secret from https://dashboard.groupdocs.cloud)
curl -v "https://api.groupdocs.cloud/connect/token" \
-X POST \
-d "grant_type=client_credentials&client_id=$CLIENT_ID&client_secret=$CLIENT_SECRET" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Accept: application/json"
# Convert and download (Word → JPG; format is a required query parameter)
curl -v "https://api.groupdocs.cloud/v2.0/viewer/convertAndDownload?format=jpg" \
-X PUT \
-H "Content-Type: multipart/form-data" \
-H "Accept: application/json" \
-H "Authorization: Bearer $JWT_TOKEN" \
--data-binary "@sample.docx"See more: Convert and download document (cURL example).
.NET SDK for GroupDocs.Viewer Cloud — .NET Core and .NET Framework.
- groupdocs-viewer-cloud-dotnet — SDK
- groupdocs-viewer-cloud-dotnet-samples — Examples
var configuration = new Configuration(MyClientId, MyClientSecret);
var apiInstance = new ViewApi(configuration);
var request = new ConvertAndDownloadRequest("jpg", File.OpenRead("sample.docx"));
var result = apiInstance.ConvertAndDownload(request);Java SDK for the GroupDocs.Viewer Cloud REST API.
- groupdocs-viewer-cloud-java — SDK
- groupdocs-viewer-cloud-java-samples — Examples
Configuration configuration = new Configuration(MyClientId, MyClientSecret);
ViewApi apiInstance = new ViewApi(configuration);
ConvertAndDownloadRequest request = new ConvertAndDownloadRequest("jpg", new File("sample.docx"), null, null);
File result = apiInstance.convertAndDownload(request);PHP SDK for the GroupDocs.Viewer Cloud REST API.
- groupdocs-viewer-cloud-php — SDK
- groupdocs-viewer-cloud-php-samples — Examples
use GroupDocs\Viewer\Model\Requests;
$configuration = new GroupDocs\Viewer\Configuration();
$configuration->setAppSid($ClientId);
$configuration->setAppKey($ClientSecret);
$apiInstance = new GroupDocs\Viewer\ViewApi($configuration);
$request = new Requests\convertAndDownloadRequest("jpg", "sample.docx");
$result = $apiInstance->convertAndDownload($request);Node.js SDK for the GroupDocs.Viewer Cloud REST API.
- groupdocs-viewer-cloud-node — SDK
- groupdocs-viewer-cloud-node-samples — Examples
const fs = require("fs");
const viewer_cloud = require("groupdocs-viewer-cloud");
const viewApi = viewer_cloud.ViewApi.fromKeys(clientId, clientSecret);
let filebuf = fs.readFileSync("sample.docx");
let request = new viewer_cloud.ConvertAndDownloadRequest("jpg", filebuf);
let result = await viewApi.convertAndDownload(request);Python SDK for the GroupDocs.Viewer Cloud REST API.
- groupdocs-viewer-cloud-python — SDK
- groupdocs-viewer-cloud-python-samples — Examples
import groupdocs_viewer_cloud
api_instance = groupdocs_viewer_cloud.ViewApi.from_keys(client_id, client_secret)
with open("sample.docx", "rb") as file:
request = groupdocs_viewer_cloud.ConvertAndDownloadRequest("jpg", file)
result = api_instance.convert_and_download(request)Ruby SDK for the GroupDocs.Viewer Cloud REST API.
- groupdocs-viewer-cloud-ruby — SDK
- groupdocs-viewer-cloud-ruby-samples — Examples
require 'groupdocs_viewer_cloud'
api_instance = GroupDocsViewerCloud::ViewApi.from_keys($client_id, $client_secret)
file = File.open("sample.docx", "r")
request = GroupDocsViewerCloud::ConvertAndDownloadRequest.new("jpg", file)
result = api_instance.convert_and_download(request)Go SDK for the GroupDocs.Viewer Cloud REST API.
- groupdocs-viewer-cloud-go — SDK
- groupdocs-viewer-cloud-go-samples — Examples
file, err := os.Open("sample.docx")
if err != nil {
return
}
defer file.Close()
result, _, err := config.Client.ViewApi.ConvertAndDownload(config.Ctx, "jpg", file, nil)- In-app document preview — Render Office, PDF, and images to HTML or JPG for browser and mobile viewers.
- Secure PDF delivery — Produce password-protected or permission-locked PDF previews for portals and sharing.
- CAD & engineering review — View drawings and layouts without desktop CAD software.
- Email & archive browsing — Preview MSG/EML, PST folders, and ZIP contents in web UIs.
- Serverless rendering — Call convert-and-download from AWS Lambda or Azure Functions with no intermediate storage.
Use Client ID and Client Secret from GroupDocs Cloud Dashboard to authenticate. Set them in your SDK configuration (e.g. Configuration, from_keys, or environment variables) before calling the API.
| Feature | Description |
|---|---|
| 100+ formats | DOCX, PDF, XLSX, PPTX, HTML, MSG/EML, CAD, Visio, Project, archives, images, and more. |
| HTML, image & PDF views | Render pages to HTML, JPG/PNG, or PDF for embedding or download. |
| No storage required | Convert and download in one call with the input file in the request body. |
| Page control | Render selected pages, ranges, consecutive sets, or reorder/rotate pages. |
| Watermarks & protection | Add watermarks; open password-protected files; protect output PDF. |
| Layout fidelity | Preserve fonts, images, comments, notes, and format-specific options. |
| Document info | Get page count, attachments, and format-specific metadata before rendering. |
| Resource | Link |
|---|---|
| Documentation | GroupDocs.Viewer Cloud Docs — guides, API reference, and SDK usage. |
| Support forum | GroupDocs Cloud Free Support Forum — ask questions and report issues. |
| Temporary license | Get a free trial — full-feature evaluation. |
| Live demo | GroupDocs.Viewer apps — try viewing in the browser. |
| API reference | REST API Reference — Swagger/OpenAPI. |
document-viewer document-preview-api pdf-viewer word-viewer excel-viewer powerpoint-viewer html-viewer image-viewer cad-viewer email-viewer visio-viewer cloud-document-viewer render-to-html render-to-jpg render-to-pdf convert-and-download viewer-sdk groupdocs-viewer-cloud