Navegue pelos nossos produtos

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

Instalação

O pacote está disponível no nuget.org e pode ser instalado via console do gerenciador de pacotes executando o seguinte comando:

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

Version NuGet NuGet-GroupDocsCloud


Início rápido

Obtenha suas credenciais de API

Para usar o GroupDocs.Conversion Cloud, cadastre-se no GroupDocs.Cloud Dashboard e obtenha seu Client ID e Client Secret.

Inicialize a API

Use o código a seguir para começar a usar o GroupDocs.Conversion Cloud SDK para .NET:

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

Converta um documento

Após a inicialização, use este exemplo básico para converter um documento:

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

Com este guia de início rápido, você está pronto para começar a converter documentos usando GroupDocs.Conversion Cloud em seus aplicativos .NET. Para mais detalhes, visite a documentação.

Converter documentos entre vários formatos Cloud API

Este código permite que os desenvolvedores convertam documentos entre vários formatos programaticamente, eliminando conversões manuais. Suporta mais de 50 formatos de arquivo, sendo ideal para desenvolvedores de aplicativos que precisam de suporte multi-formato.

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

Converter páginas específicas de um documento Cloud API

Este exemplo demonstra como os desenvolvedores podem converter apenas páginas específicas, economizando tempo de processamento e reduzindo o tamanho dos arquivos quando apenas parte do documento é necessária.

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

Detectar automaticamente formatos de documentos para conversão

Este trecho destaca a capacidade de converter documentos mesmo quando a extensão do arquivo é desconhecida, sendo muito útil para lidar com arquivos enviados por usuários cujos formatos podem não estar claramente definidos.

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



 Português