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.

Instalação
O pacote está disponível em nuget.org e pode ser instalado pelo Console do Gerenciador de Pacotes com o seguinte comando:
NuGet\Install-Package GroupDocs.viewer-Cloud

Requisitos
- .NET Framework 2.0 ou .NET Standard 2.0
- NuGet
- System.Web ao direcionar para o .NET Framework 2.0
- Credenciais do GroupDocs Cloud — Client ID and Client Secret do painel
Início rápido
Obter as credenciais de API
Para usar o GroupDocs.Viewer Cloud, inscreva-se no painel do GroupDocs.Cloud e obtenha o Client ID e o Client Secret.
Inicializar a API
Use o código a seguir para começar a usar o GroupDocs.Viewer Cloud SDK for .NET.
using GroupDocs.Viewer.Cloud.Sdk.Api;
using GroupDocs.Viewer.Cloud.Sdk.Client;
string MyClientId = "YourClientId";
string MyClientSecret = "YourClientSecret";
var config = new Configuration(MyClientId, MyClientSecret);
config.ApiBaseUrl = "https://api.groupdocs.cloud";
var apiInstance = new ViewApi(config);
Veja o exemplo completo em Constants.cs.
Converter um documento local em JPEG
Este exemplo renderiza um documento do Word local em JPEG sem carregá-lo no armazenamento em nuvem.
using System.IO;
using GroupDocs.Viewer.Cloud.Sdk.Api;
using GroupDocs.Viewer.Cloud.Sdk.Client;
using GroupDocs.Viewer.Cloud.Sdk.Model.Requests;
var config = new Configuration("YourClientId", "YourClientSecret");
config.ApiBaseUrl = "https://api.groupdocs.cloud";
var apiInstance = new ViewApi(config);
var response = apiInstance.ConvertAndDownload(new ConvertAndDownloadRequest("jpg", File.OpenRead("sample.docx")));
Console.WriteLine("ConvertAndDownload completed: " + response.Length + " bytes received");
Veja o exemplo completo em ConvertAndDownload.cs.
Renderizar páginas selecionadas
Este exemplo renderiza as páginas 2 e 3 de um documento do Word em HTML.
using System.Collections.Generic;
using GroupDocs.Viewer.Cloud.Sdk.Api;
using GroupDocs.Viewer.Cloud.Sdk.Client;
using GroupDocs.Viewer.Cloud.Sdk.Model;
using GroupDocs.Viewer.Cloud.Sdk.Model.Requests;
var config = new Configuration("YourClientId", "YourClientSecret");
config.ApiBaseUrl = "https://api.groupdocs.cloud";
var apiInstance = new ViewApi(config);
var viewOptions = new ViewOptions
{
FileInfo = new FileInfo { FilePath = "SampleFiles/sample.docx" },
ViewFormat = ViewOptions.ViewFormatEnum.HTML,
RenderOptions = new RenderOptions
{
PagesToRender = new List<int?> { 2, 3 }
}
};
var response = apiInstance.CreateView(new CreateViewRequest(viewOptions));
Console.WriteLine("RenderSelectedPages completed: " + response.Pages.Count);
Veja o exemplo completo em RenderSelectedPages.cs.
Renderizar um documento protegido por senha
Este exemplo renderiza um documento do Word protegido por senha em HTML.
using GroupDocs.Viewer.Cloud.Sdk.Api;
using GroupDocs.Viewer.Cloud.Sdk.Client;
using GroupDocs.Viewer.Cloud.Sdk.Model;
using GroupDocs.Viewer.Cloud.Sdk.Model.Requests;
var config = new Configuration("YourClientId", "YourClientSecret");
config.ApiBaseUrl = "https://api.groupdocs.cloud";
var apiInstance = new ViewApi(config);
var viewOptions = new ViewOptions
{
FileInfo = new FileInfo
{
FilePath = "SampleFiles/password_protected.docx",
Password = "12345"
},
ViewFormat = ViewOptions.ViewFormatEnum.HTML
};
var response = apiInstance.CreateView(new CreateViewRequest(viewOptions));
Console.WriteLine("ViewProtectedDocument completed: " + response.Pages.Count);
Veja o exemplo completo em ViewProtectedDocument.cs.
Recupere os formatos aceitos pela API viewer.
using System.Linq;
using GroupDocs.Viewer.Cloud.Sdk.Api;
using GroupDocs.Viewer.Cloud.Sdk.Client;
var config = new Configuration("YourClientId", "YourClientSecret");
config.ApiBaseUrl = "https://api.groupdocs.cloud";
var apiInstance = new InfoApi(config);
var response = apiInstance.GetSupportedFileFormats();
foreach (var entry in response.Formats.Take(5))
{
Console.WriteLine($"{entry.FileFormat}: {entry.Extension}");
}
Veja o exemplo completo em GetSupportedFormats.cs.
Exemplos no GitHub
O repositório GroupDocs.Viewer Cloud .NET Examples inclui exemplos prontos para executar sobre:
| Category | Examples |
|---|
| Renderizar | Saída HTML, PDF e imagem; páginas selecionadas; marcas d’água; documentos protegidos |
| Por formato | CAD, email, PDF, planilha, texto, Visio, processamento de texto, arquivos compactados, Outlook, Project |
| Info | Informações do documento, anexos, formatos compatíveis |
Como executar os exemplos
- Clone ou baixe o repositório de exemplos
- Abra
Examples/GroupDocs.Viewer.Cloud.Examples.CSharp.sln no Visual Studio 2017 ou posterior - Clique com o botão direito do mouse na solução e selecione Enable NuGet Package Restore
- Edite
Examples/GroupDocs.Viewer.Cloud.Examples.CSharp/RunExamples.cs e defina Constants.MyClientId e Constants.MyClientSecret - Compile e execute
Para mais detalhes, visite Getting Started.

Marcas
Document Rendering API | .NET 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