Explore nuestros productos

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

Instalación

El paquete está disponible en nuget.org y puede instalarse a través de la consola del administrador de paquetes ejecutando el siguiente comando:

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

Version NuGet NuGet-GroupDocsCloud


Inicio rápido

Obtenga sus credenciales de API

Para usar GroupDocs.Conversion Cloud, regístrese en GroupDocs.Cloud Dashboard y obtenga su Client ID y Client Secret.

Inicializar la API

Use el siguiente código para comenzar a usar el SDK de GroupDocs.Conversion Cloud para .NET:

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

Convertir un documento

Una vez inicializado, use este ejemplo básico para convertir un 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);

Con esta guía de inicio rápido, está listo para comenzar a convertir documentos usando GroupDocs.Conversion Cloud en sus aplicaciones .NET. Para más detalles, visite la documentación.

Convertir documentos entre varios formatos Cloud API

Este código permite a los desarrolladores convertir documentos entre varios formatos de forma programática, eliminando las conversiones manuales. Admite más de 50 formatos de archivo, lo que lo hace ideal para desarrolladores de aplicaciones que requieren soporte 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);

Convertir páginas específicas de un documento Cloud API

Este ejemplo demuestra cómo los desarrolladores pueden convertir solo páginas específicas, ahorrando tiempo de procesamiento y reduciendo el tamaño de los archivos cuando solo se necesita una parte del documento.

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

Detección automática de formatos de documentos para la conversión

Este fragmento destaca la capacidad de convertir documentos incluso cuando la extensión del archivo es desconocida, lo que resulta muy útil para manejar archivos cargados por el usuario donde los formatos pueden no 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


Etiquetas

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



 Español