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.Conversion-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.Conversion Cloud を使用するには、GroupDocs.Cloud ダッシュボード で登録し、Client ID と Client Secret を取得します。
API を初期化する
次のコードで GroupDocs.Conversion Cloud SDK for .NET の使用を開始します。
using GroupDocs.Conversion.Cloud.Sdk.Api;
using GroupDocs.Conversion.Cloud.Sdk.Client;
// Get your ClientId and ClientSecret at https://dashboard.groupdocs.cloud
string MyClientId = "YourClientId";
string MyClientSecret = "YourClientSecret";
var config = new Configuration(MyClientId, MyClientSecret);
config.ApiBaseUrl = "https://api.groupdocs.cloud";
var apiInstance = new ConvertApi(config);
完全な例は Constants.cs を参照してください。
文書を変換する(直接、クラウド ストレージなし)
初期化したら、この基本例でローカル文書を変換し、結果を直接受け取ります。
using System;
using System.IO;
using GroupDocs.Conversion.Cloud.Sdk.Api;
using GroupDocs.Conversion.Cloud.Sdk.Client;
using GroupDocs.Conversion.Cloud.Sdk.Model.Requests;
var config = new Configuration("YourClientId", "YourClientSecret");
config.ApiBaseUrl = "https://api.groupdocs.cloud";
var apiInstance = new ConvertApi(config);
var fileStream = File.Open("four-pages.docx", FileMode.Open);
var request = new ConvertDocumentDirectRequest("pdf", fileStream);
var response = apiInstance.ConvertDocumentDirect(request);
Console.WriteLine("Document converted successfully: " + response.Length);
完全な例は ConvertToPdfDirect.cs を参照してください。
クラウド ストレージを使って文書を変換する
この例では、ファイルを GroupDocs Cloud ストレージにアップロードし、変換して結果をダウンロードします。
using System;
using System.IO;
using GroupDocs.Conversion.Cloud.Sdk.Api;
using GroupDocs.Conversion.Cloud.Sdk.Client;
using GroupDocs.Conversion.Cloud.Sdk.Model;
using GroupDocs.Conversion.Cloud.Sdk.Model.Requests;
var configuration = new Configuration("YourClientId", "YourClientSecret");
var fileApi = new FileApi(configuration);
var convertApi = new ConvertApi(configuration);
var fileStream = File.Open("myFile.docx", FileMode.Open);
fileApi.UploadFile(new UploadFileRequest("myFile.docx", fileStream));
var settings = new ConvertSettings
{
FilePath = "myFile.docx",
Format = "pdf",
OutputPath = "converted"
};
convertApi.ConvertDocument(new ConvertDocumentRequest(settings));
var response = fileApi.DownloadFile(new DownloadFileRequest("converted/myFile.pdf"));
Console.WriteLine("Expected response type is Stream: " + response.Length.ToString());
詳細は SDK README を参照してください。
さまざまな形式の間で文書を変換する
このコードは、パスワードで保護された Word 文書を出力オプション付きで PDF に変換します。
using System;
using GroupDocs.Conversion.Cloud.Sdk.Api;
using GroupDocs.Conversion.Cloud.Sdk.Client;
using GroupDocs.Conversion.Cloud.Sdk.Model;
using GroupDocs.Conversion.Cloud.Sdk.Model.Requests;
var config = new Configuration("YourClientId", "YourClientSecret");
config.ApiBaseUrl = "https://api.groupdocs.cloud";
var apiInstance = new ConvertApi(config);
var settings = new ConvertSettings
{
FilePath = "WordProcessing/password-protected.docx",
Format = "pdf",
LoadOptions = new WordProcessingLoadOptions { Password = "password" },
ConvertOptions = new PdfConvertOptions
{
CenterWindow = true,
CompressImages = false,
DisplayDocTitle = true,
Dpi = 1024,
FromPage = 1,
ImageQuality = 100,
Password = "password",
UnembedFonts = true
},
OutputPath = "converted"
};
var response = apiInstance.ConvertDocument(new ConvertDocumentRequest(settings));
Console.WriteLine("Document converted successfully: " + response[0].Url);
完全な例は ConvertToPdf.cs を参照してください。
文書の特定のページを変換する
この例では、1 ページと 3 ページだけを変換します。
using System;
using System.Collections.Generic;
using GroupDocs.Conversion.Cloud.Sdk.Api;
using GroupDocs.Conversion.Cloud.Sdk.Client;
using GroupDocs.Conversion.Cloud.Sdk.Model;
using GroupDocs.Conversion.Cloud.Sdk.Model.Requests;
var config = new Configuration("YourClientId", "YourClientSecret");
config.ApiBaseUrl = "https://api.groupdocs.cloud";
var apiInstance = new ConvertApi(config);
var settings = new ConvertSettings
{
FilePath = "WordProcessing/four-pages.docx",
Format = "pdf",
ConvertOptions = new PdfConvertOptions
{
Pages = new List<int?> { 1, 3 }
},
OutputPath = "converted/two-pages.pdf"
};
var response = apiInstance.ConvertDocument(new ConvertDocumentRequest(settings));
Console.WriteLine("Document converted successfully: " + response[0].Url);
完全な例は ConvertSpecificPages .cs を参照してください。
サポートされる変換形式を取得する
サポートされる変換元から変換先への変換を取得します。
using System;
using System.Linq;
using GroupDocs.Conversion.Cloud.Sdk.Api;
using GroupDocs.Conversion.Cloud.Sdk.Client;
using GroupDocs.Conversion.Cloud.Sdk.Model.Requests;
var config = new Configuration("YourClientId", "YourClientSecret");
config.ApiBaseUrl = "https://api.groupdocs.cloud";
var apiInstance = new InfoApi(config);
var response = apiInstance.GetSupportedConversionTypes(new GetSupportedConversionTypesRequest());
foreach (var entry in response.Take(2))
{
Console.WriteLine($"{entry.SourceFormat}: {string.Join(",", entry.TargetFormats)}");
}
完全な例は GetSupportedConversions.cs を参照してください。
GitHub の例
GroupDocs.Conversion Cloud .NET Examples リポジトリには、次を扱うすぐに実行できる例があります。
| Category | Examples |
|---|
| 変換 | PDF、HTML、画像、プレゼンテーション、スプレッドシート、ワープロ; 直接変換; 非同期変換 |
| 共通オプション | 透かし、特定のページ、連続するページ、カスタム フォント |
| 読み込みオプション | CAD、CSV、メール、HTML、OneNote、PDF、プレゼンテーション、スプレッドシート、テキスト、ワープロ |
| Info | サポートされる変換、文書情報、ライセンス情報、ライセンス消費 |
例の実行方法
- 例のリポジトリ をクローンまたはダウンロードします
- Visual Studio 2017 以降で
Examples/GroupDocs.Conversion.Cloud.Examples.CSharp.sln を開きます - ソリューションを右クリックし、Enable NuGet Package Restore を選択します
Examples/GroupDocs.Conversion.Cloud.Examples.CSharp/RunExamples.cs を編集し、Constants.MyClientId と Constants.MyClientSecret を設定します- ビルドして実行します
詳細は Getting Started を参照してください。

タグ
Document Conversion API | .NET Cloud API | GroupDocs.Conversion Cloud | REST API | Document Conversion | Auto-detect Formats | Watermarking API | Multi-Format Output | Batch Document Conversion | PDF Conversion | Custom Conversion Options | Page-by-Page Conversion | Font Replacement | OCR Support | Metadata Extraction | Document Merge | Storage API | Document Information API | Document Load Options | Multi-Language Support | Cloud Storage Integration | SDKs for .NET, Java, Python | Secure API Access | Docker Support | Scalable Document Conversion | API Rate Limiting