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 the Package Manager Console by executing the following command:

NuGet\Install-Package GroupDocs.Merger-Cloud

Version NuGet NuGet-GroupDocsCloud


Requirements

  • .NET Framework 2.0 or .NET Standard 2.0
  • NuGet
  • System.Web when targeting .NET Framework 2.0
  • GroupDocs Cloud credentials — Client ID and Client Secret from the Dashboard

Quick Start

Get your API credentials

To use GroupDocs.Merger Cloud, 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.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);

See the full example in Common.cs.

Join documents

This example joins two Word documents into one file.

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

See the full example in JoinMultipleDocuments.cs.

Split a Document

This example splits pages 3, 6, and 8 into separate documents.

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

See the full example in SplitToSinglePages.cs.

Rotate Pages

This example rotates pages 2 and 4 by 90 degrees.

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

See the full example in RotatePages.cs.

Get Supported File Types

Retrieve the formats the merger API accepts.

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)}");
}

See the full example in GetSupportedFileTypes.cs.

Examples on GitHub

The GroupDocs.Merger Cloud .NET Examples repository includes ready-to-run examples covering:

CategoryExamples
JoinMultiple documents, images, cross format, selected pages
SplitSingle pages, page ranges
PagesRotate, move, swap, remove, extract, change orientation
SecurityAdd, check, update, and remove a document password
InfoDocument information, supported file types

How to run the examples

  1. Clone or download the examples repository
  2. Open Examples/GroupDocs.Merger.Cloud.Examples.CSharp.sln in Visual Studio 2017 or later
  3. Right-click the solution and select Enable NuGet Package Restore
  4. Edit Examples/GroupDocs.Merger.Cloud.Examples.CSharp/RunExamples.cs and set Common.ClientId and Common.ClientSecret
  5. Build and run

For more details, visit Getting Started.


Product Docs Swagger Examples Blog Support Dashboard


Tags

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


 English