Browse our Products

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

Installation

The package is available at nuget.org and it can be installed via package manager console by executing following command:

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

Version NuGet NuGet-GroupDocsCloud


Quick Start

Get your API credentials

To use GroupDocs.Conversion Cloud, you’ll need to sign up at GroupDocs.Cloud Dashboard and get your Client ID and Client Secret.

Initialize the API

Use the following code to start using the GroupDocs.Conversion Cloud SDK for .NET:

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

Convert a document

Once initialized, use this basic example to convert a document:

// 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);

With this quick start guide, you’re all set to begin converting documents using GroupDocs.Conversion Cloud in your .NET applications. For more details, visit the documentation.

Convert Documents Between Various Formats Cloud API

This code allows developers to convert documents between various formats programmatically, eliminating manual conversions. It supports over 50 file formats, making it ideal for application developers requiring multi-format support.

// 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);

Convert Specific Pages of a Document Cloud API

This example demonstrates how developers can convert only specific pages, saving processing time and reducing file sizes when only a part of the document is needed.

// 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);

Auto-detect Document Formats for Conversion

This snippet highlights the ability to convert documents even when the file extension is unknown, making it highly useful for handling user-uploaded files where formats may not be clearly defined.

// 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


Tags

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



 English