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.

インストール
パッケージは nuget.org で公開されています。パッケージ マネージャー コンソールで次のコマンドを実行してインストールできます。
NuGet\Install-Package GroupDocs.viewer-Cloud

要件
- .NET Framework 2.0 または .NET Standard 2.0
- NuGet
- .NET Framework 2.0 を対象とする場合の System.Web
- GroupDocs Cloud の資格情報 — ダッシュボードの Client ID and Client Secret
クイック スタート
API 資格情報を取得する
GroupDocs.Viewer Cloud を使用するには、GroupDocs.Cloud ダッシュボード で登録し、Client ID と Client Secret を取得します。
API を初期化する
次のコードで 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);
完全な例は Constants.cs を参照してください。
ローカル文書を JPEG に変換する
この例では、ローカルの Word 文書をクラウド ストレージにアップロードせずに JPEG として描画します。
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");
完全な例は ConvertAndDownload.cs を参照してください。
選択したページを描画する
この例では、Word 文書の 2 ページと 3 ページを 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);
完全な例は RenderSelectedPages.cs を参照してください。
パスワードで保護された文書を描画する
この例では、パスワードで保護された Word 文書を 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);
完全な例は ViewProtectedDocument.cs を参照してください。
サポートされるファイル形式を取得する
viewer API が受け付ける形式を取得します。
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}");
}
完全な例は GetSupportedFormats.cs を参照してください。
GitHub の例
GroupDocs.Viewer Cloud .NET Examples リポジトリには、次を扱うすぐに実行できる例があります。
| Category | Examples |
|---|
| 描画 | HTML、PDF、画像出力; 選択したページ; 透かし; 保護された文書 |
| 形式別 | CAD、メール、PDF、スプレッドシート、テキスト、Visio、ワープロ、アーカイブ、Outlook、Project |
| Info | 文書情報、添付ファイル、サポートされる形式 |
例の実行方法
- 例のリポジトリ をクローンまたはダウンロードします
- Visual Studio 2017 以降で
Examples/GroupDocs.Viewer.Cloud.Examples.CSharp.sln を開きます - ソリューションを右クリックし、Enable NuGet Package Restore を選択します
Examples/GroupDocs.Viewer.Cloud.Examples.CSharp/RunExamples.cs を編集し、Constants.MyClientId と Constants.MyClientSecret を設定します- ビルドして実行します
詳細は Getting Started を参照してください。

タグ
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