Skip to content

groupdocs-merger-cloud/groupdocs-merger-cloud-dotnet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 

Repository files navigation

GroupDocs.Merger Cloud SDK for .NET

This repository contains GroupDocs.Merger Cloud SDK for .NET source code. This SDK allows you to work with GroupDocs.Merger Cloud REST APIs in your .NET applications.

GroupDocs.Merger Cloud allows you to merge documents and manipulate document structure across wide range of supported document types - PDF, DOCX/DOC, PPTX/PPT, XLSX/XLS, VSDX/VSD, ODT, ODS, ODP, HTML, EPUB and many others. Merge several documents into one, split single document to multiple documents, reorder or replace document pages, change page orientation, manage document password and perform other manipulations with GroupDocs.Merger Cloud API.

How to use the SDK

The complete source code is available in this repository folder, you can either directly use it in your project via NuGet package manager. For more details, please visit our documentation website.

Getting Started

This example demonstrates merging different Word files seamlessly with a few lines of code:

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 System;
using System.Collections.Generic;
using FileInfo = GroupDocs.Merger.Cloud.Sdk.Model.FileInfo;

namespace GroupDocs.Merger.Cloud.Examples.CSharp
{
    /// <summary>
    /// This example demonstrates how to join specific pages from several source documents.
    /// </summary>
    public class JoinPagesFromVariousDocuments
    {
		public static void Run()
		{
            var configuration = new Configuration(Common.MyAppSid, Common.MyAppKey);
            var apiInstance = new DocumentApi(configuration);

			try
			{
                var item1 = new JoinItem
                {
                    FileInfo = new FileInfo
                    {
                        FilePath = "WordProcessing/sample-10-pages.docx"
                    },
                    Pages = new List<int?> {  3, 6, 8 }
                };

                var item2 = new JoinItem
                {
                    FileInfo = new FileInfo
                    {
                        FilePath = "WordProcessing/four-pages.docx"
                    },
                    StartPageNumber= 1,
                    EndPageNumber = 4,
                    RangeMode = JoinItem.RangeModeEnum.OddPages 
                };

                var options = new JoinOptions
                {
                    JoinItems = new List<JoinItem> { item1, item2 },
                    OutputPath = "Output/joined-pages.docx"
                };

                var request = new JoinRequest(options);
                var response = apiInstance.Join(request);

                Console.WriteLine("Output file path: " + response.Path);
            }
			catch (Exception e)
			{
				Console.WriteLine("Exception while calling api: " + e.Message);
			}
		}
	}
}

Licensing

All GroupDocs.Merger Cloud SDKs are licensed under MIT License.

Resources

Home | Product Page | Docs | Demos | API Reference | Examples | Blog | Free Support | Free Trial

About

.NET library for communicating with the GroupDocs.Merger Cloud API

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages