製品を閲覧する

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.


Product Docs Swagger Examples Blog Support Dashboard

インストール

パッケージは nuget.org で入手可能で、次のコマンドをパッケージ マネージャー コンソールで実行することでインストールできます:

PM> NuGet\Install-Package GroupDocs.Conversion-Cloud

Version NuGet NuGet-GroupDocsCloud


クイック スタート

API 認証情報を取得する

GroupDocs.Conversion Cloud を使用するには、GroupDocs.Cloud Dashboard にサインアップし、Client IDClient Secret を取得してください。

API を初期化する

次のコードを使用して、GroupDocs.Conversion Cloud SDK for .NET の使用を開始します:

// Initialize the API instance
var configuration = new Configuration
{
    ClientId = "YourClientId",
    ClientSecret = "YourClientSecret"
};
var conversionApi = new ConversionApi(configuration);

ドキュメントを変換する

初期化後、この基本的な例を使用してドキュメントを変換します:

// Set up conversion settings
var convertSettings = new ConvertSettings
{
    FilePath = "input.docx",
    Format = "pdf"
};

// Convert the document
var response = conversionApi.ConvertDocument(convertSettings);

// Save the converted file
File.WriteAllBytes("output.pdf", response.File);

このクイック スタート ガイドで、.NET アプリケーションで GroupDocs.Conversion Cloud を使用してドキュメントの変換を開始する準備が整いました。詳細については、ドキュメントをご覧ください。

さまざまな形式間でドキュメントを変換する Cloud API

このコードにより、開発者はプログラムでさまざまな形式間でドキュメントを変換でき、手動変換を排除できます。50 以上のファイル形式をサポートしており、マルチフォーマット サポートを必要とするアプリケーション開発者に最適です。

// Initialize the API instance
var conversionApi = new ConversionApi(new Configuration { ClientId = "YourClientId", ClientSecret = "YourClientSecret" });

// Set up the conversion settings: source format, target format, etc.
var convertSettings = new ConvertSettings
{
    // Specify input file path and desired output format
    FilePath = "input.docx",
    Format = "pdf"  // Convert DOCX to PDF
    
    // Optional: specify page range, font substitution, etc.
};

// Execute the conversion and retrieve the converted file
var response = conversionApi.ConvertDocument(convertSettings);

// Save the converted document to the specified location
File.WriteAllBytes("output.pdf", response.File);

ドキュメントの特定のページを変換する Cloud API

この例では、開発者が特定のページのみを変換する方法を示しています。ドキュメントの一部のみが必要な場合に、処理時間を節約し、ファイル サイズを削減できます。

// Initialize the API instance with authentication credentials
var conversionApi = new ConversionApi(new Configuration { ClientId = "YourClientId", ClientSecret = "YourClientSecret" });

// Configure the settings to convert specific pages (e.g., pages 1 to 3)
var convertSettings = new ConvertSettings
{
    FilePath = "input.pptx",
    Format = "pdf",  // Convert PPTX to PDF
    
    // Specify the pages to convert (e.g., first 3 pages)
    Pages = new List<int> { 1, 2, 3 }
};

// Execute the conversion
var response = conversionApi.ConvertDocument(convertSettings);

// Save the resulting file
File.WriteAllBytes("output_pages1-3.pdf", response.File);

変換用のドキュメント形式を自動検出

このスニペットは、ファイル拡張子が不明な場合でもドキュメントを変換できる機能を強調しています。形式が明確に定義されていない可能性のあるユーザー アップロード ファイルの処理に非常に有用です。

// Initialize the Conversion API with credentials
var conversionApi = new ConversionApi(new Configuration { ClientId = "YourClientId", ClientSecret = "YourClientSecret" });

// Configure settings for auto-detecting format without file extension
var convertSettings = new ConvertSettings
{
    FilePath = "input_file",  // No file extension required
    Format = "pdf"  // Desired output format (e.g., PDF)
};

// Execute the conversion
var response = conversionApi.ConvertDocument(convertSettings);

// Save the converted file to the output path
File.WriteAllBytes("output.pdf", response.File);

Product Docs Swagger Examples Blog Support Dashboard


タグ

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



 日本