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.
If you experience errors, when you try to download a file, make sure your network policies (enforced by your company or ISP) allow downloading ZIP and/or MSI files.

Установка
Пакет доступен на nuget.org. Его можно установить через консоль диспетчера пакетов следующей командой:
NuGet\Install-Package GroupDocs.Merger-Cloud

Требования
- .NET Framework 2.0 или .NET Standard 2.0
- NuGet
- System.Web при целевой платформе .NET Framework 2.0
- Учетные данные GroupDocs Cloud — Client ID and Client Secret на панели
Быстрый старт
Получение учетных данных API
Чтобы использовать GroupDocs.Merger Cloud, зарегистрируйтесь на панели GroupDocs.Cloud и получите Client ID и Client Secret.
Инициализация API
Следующий код запускает 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);
Полный пример см. в Common.cs.
Объединение документов
В этом примере два документа Word объединяются в один файл.
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);
Полный пример см. в JoinMultipleDocuments.cs.
Разделение документа
В этом примере страницы 3, 6 и 8 разделяются на отдельные документы.
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);
}
Полный пример см. в SplitToSinglePages.cs.
Поворот страниц
В этом примере страницы 2 и 4 поворачиваются на 90 градусов.
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);
Полный пример см. в RotatePages.cs.
Получение поддерживаемых типов файлов
Получите форматы, которые принимает API 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)}");
}
Полный пример см. в GetSupportedFileTypes.cs.
Примеры на GitHub
Репозиторий GroupDocs.Merger Cloud .NET Examples содержит готовые к запуску примеры по темам:
| Category | Examples |
|---|
| Объединение | Несколько документов, изображения, между форматами, выбранные страницы |
| Разделение | Отдельные страницы, диапазоны страниц |
| Страницы | Поворот, перемещение, обмен, удаление, извлечение, смена ориентации |
| Безопасность | Добавление, проверка, обновление и удаление пароля документа |
| Info | Сведения о документе, поддерживаемые типы файлов |
Как запустить примеры
- Клонируйте или скачайте репозиторий примеров
- Откройте
Examples/GroupDocs.Merger.Cloud.Examples.CSharp.sln в Visual Studio 2017 или новее - Щелкните решение правой кнопкой мыши и выберите Enable NuGet Package Restore
- Измените
Examples/GroupDocs.Merger.Cloud.Examples.CSharp/RunExamples.cs и задайте Common.ClientId и Common.ClientSecret - Соберите и запустите
Подробности см. в разделе Getting Started.

Теги
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