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 se puede instalar desde la consola del Administrador de paquetes con el siguiente comando:

NuGet\Install-Package GroupDocs.Merger-Cloud

Version NuGet NuGet-GroupDocsCloud


Requisitos

  • .NET Framework 2.0 o .NET Standard 2.0
  • NuGet
  • System.Web al dirigirse a .NET Framework 2.0
  • Credenciales de GroupDocs Cloud — Client ID and Client Secret del panel

Inicio rápido

Obtener las credenciales de API

Para usar GroupDocs.Merger Cloud, regístrese en el panel de GroupDocs.Cloud y obtenga el Client ID y el Client Secret.

Inicializar la API

Use el código siguiente para empezar a usar GroupDocs.Merger Cloud SDK for .NET.

using GroupDocs.Merger.Cloud.Sdk.Api;
using GroupDocs.Merger.Cloud.Sdk.Client;

string MyClientId = "YourClientId";
string MyClientSecret = "YourClientSecret";

var config = new Configuration(MyClientId, MyClientSecret);
config.ApiBaseUrl = "https://api.groupdocs.cloud";

var apiInstance = new DocumentApi(config);

Vea el ejemplo completo en Common.cs.

Unir documentos

Este ejemplo une dos documentos de Word en un archivo.

using System.Collections.Generic;
using GroupDocs.Merger.Cloud.Sdk.Api;
using GroupDocs.Merger.Cloud.Sdk.Client;
using GroupDocs.Merger.Cloud.Sdk.Model;
using GroupDocs.Merger.Cloud.Sdk.Model.Requests;
using FileInfo = GroupDocs.Merger.Cloud.Sdk.Model.FileInfo;

var config = new Configuration("YourClientId", "YourClientSecret");
config.ApiBaseUrl = "https://api.groupdocs.cloud";
var apiInstance = new DocumentApi(config);

var options = new JoinOptions
{
    JoinItems = new List<JoinItem>
    {
        new JoinItem { FileInfo = new FileInfo { FilePath = "WordProcessing/four-pages.docx" } },
        new JoinItem { FileInfo = new FileInfo { FilePath = "WordProcessing/one-page.docx" } }
    },
    OutputPath = "Output/joined.docx"
};

var response = apiInstance.Join(new JoinRequest(options));
Console.WriteLine("Output file path: " + response.Path);

Vea el ejemplo completo en JoinMultipleDocuments.cs.

Dividir un documento

Este ejemplo divide las páginas 3, 6 y 8 en documentos independientes.

using System.Collections.Generic;
using GroupDocs.Merger.Cloud.Sdk.Api;
using GroupDocs.Merger.Cloud.Sdk.Client;
using GroupDocs.Merger.Cloud.Sdk.Model;
using GroupDocs.Merger.Cloud.Sdk.Model.Requests;
using FileInfo = GroupDocs.Merger.Cloud.Sdk.Model.FileInfo;

var config = new Configuration("YourClientId", "YourClientSecret");
config.ApiBaseUrl = "https://api.groupdocs.cloud";
var apiInstance = new DocumentApi(config);

var options = new SplitOptions
{
    FileInfo = new FileInfo { FilePath = "WordProcessing/sample-10-pages.docx" },
    OutputPath = "Output/split-document",
    Pages = new List<int?> { 3, 6, 8 },
    Mode = SplitOptions.ModeEnum.Pages
};

var response = apiInstance.Split(new SplitRequest(options));

foreach (var document in response.Documents)
{
    Console.WriteLine("Output file path: " + document.Path);
}

Vea el ejemplo completo en SplitToSinglePages.cs.

Rotar páginas

Este ejemplo gira las páginas 2 y 4 90 grados.

using System.Collections.Generic;
using GroupDocs.Merger.Cloud.Sdk.Api;
using GroupDocs.Merger.Cloud.Sdk.Client;
using GroupDocs.Merger.Cloud.Sdk.Model;
using GroupDocs.Merger.Cloud.Sdk.Model.Requests;
using FileInfo = GroupDocs.Merger.Cloud.Sdk.Model.FileInfo;

var config = new Configuration("YourClientId", "YourClientSecret");
config.ApiBaseUrl = "https://api.groupdocs.cloud";
var apiInstance = new PagesApi(config);

var options = new RotateOptions
{
    FileInfo = new FileInfo { FilePath = "Pdf/ten-pages.pdf" },
    OutputPath = "Output/rotate-pages.pdf",
    Pages = new List<int?> { 2, 4 },
    Mode = RotateOptions.ModeEnum.Rotate90
};

var response = apiInstance.Rotate(new RotateRequest(options));
Console.WriteLine("Output file path: " + response.Path);

Vea el ejemplo completo en RotatePages.cs.

Obtener los tipos de archivo admitidos

Recupere los formatos que acepta la API de merger.

using GroupDocs.Merger.Cloud.Sdk.Api;
using GroupDocs.Merger.Cloud.Sdk.Client;

var config = new Configuration("YourClientId", "YourClientSecret");
config.ApiBaseUrl = "https://api.groupdocs.cloud";
var apiInstance = new InfoApi(config);

var response = apiInstance.GetSupportedFileFormats();

foreach (var entry in response.Formats)
{
    Console.WriteLine($"{entry.FileFormat}: {string.Join(",", entry.Extension)}");
}

Vea el ejemplo completo en GetSupportedFileTypes.cs.

Ejemplos en GitHub

El repositorio GroupDocs.Merger Cloud .NET Examples incluye ejemplos listos para ejecutar sobre:

CategoryExamples
UnirVarios documentos, imágenes, entre formatos, páginas seleccionadas
DividirPáginas individuales, intervalos de páginas
PáginasRotar, mover, intercambiar, quitar, extraer, cambiar la orientación
SeguridadAgregar, comprobar, actualizar y quitar una contraseña de documento
InfoInformación del documento, tipos de archivo admitidos

Cómo ejecutar los ejemplos

  1. Clone o descargue el repositorio de ejemplos
  2. Abra Examples/GroupDocs.Merger.Cloud.Examples.CSharp.sln en Visual Studio 2017 o posterior
  3. Haga clic con el botón derecho en la solución y seleccione Enable NuGet Package Restore
  4. Edite Examples/GroupDocs.Merger.Cloud.Examples.CSharp/RunExamples.cs y establezca Common.ClientId y Common.ClientSecret
  5. Compile y ejecute

Para obtener más detalles, visite Getting Started.


Product Docs Swagger Examples Blog Support Dashboard


Etiquetas

Document Merging API | .NET Cloud API | GroupDocs.Merger Cloud | REST API | Page Manipulation | Document Security | Password Protection | Cloud Storage Integration | File Operations | Folder Operations | Document Splitting | PDF Merging | Cross-format Merging | Word Document Merging | Excel File Merging | Presentation Merging | Document Reorganization | API Explorer | Comprehensive Documentation | Multi-Platform Support | Secure API Access | GitHub Repository | Data Encryption | Client ID and Secret | Scalable Infrastructure | Fast Processing | Document Joining | Content Management | Customizable Document Processing | Document Manipulation API | Real-time API Integration | Merge Multiple Formats | Portable Document Format | OpenDocument Formats | Cross-platform API


 Español