Merge & Split

Use our RESTful APIs to split, merge, reorder, add and remove pages within documents programmatically.

.NET Quick Start Guide - Convert

Below is a functional (copy and paste) code example of how to quickly get started with our conversion technology using our new .NET NuGet package.

Option 1: Install Using Package Manager

Install-Package Accusoft.PrizmDocServerSDK --version 1.0.0-beta.*

Option 2: Install Using .NET CLI

dotnet add package Accusoft.PrizmDocServerSDK --version 1.0.0-beta.*

Example of Merge

using System;
using System.IO;
using System.Threading.Tasks;
using Accusoft.PrizmDocServer;
using Accusoft.PrizmDocServer.Conversion;

namespace Demos
{
    class Program
    {
        static void Main(string[] args)
        {
            MainAsync().GetAwaiter().GetResult();
        }

        static async Task MainAsync()
        {
            var prizmDocServer = new PrizmDocServerClient(/* your connection info */);

            // Take a DOCX file and replace its cover page with a boilerplate cover,
            // append a boilerplate back page, and then produce a new PDF.
            ConversionResult result = await prizmDocServer.CombineToPdfAsync(
                new[] {
                    // start with a boilerplate cover page
                    new ConversionSourceDocument("boilerplate-cover-page.pdf"),
                    // keep all but the first page of the "main" document
                    new ConversionSourceDocument("project-proposal.docx", pages: "2-"),
                    // end with a boilerplate back page
                    new ConversionSourceDocument("boilerplate-back-page.pdf")
                }
            );

            // Save the result to "output.pdf".
            await result.RemoteWorkFile.SaveAsync("output.pdf");
        }
    }
}

Example of Split

using System;
using System.IO;
using System.Threading.Tasks;
using Accusoft.PrizmDocServer;

namespace Demos
{
    class Program
    {
        static void Main(string[] args)
        {
            MainAsync().GetAwaiter().GetResult();
        }

        static async Task MainAsync()
        {
            var prizmDocServer = new PrizmDocServerClient(/* your connection info */);

            // Take a DOCX file and convert all of its pages except the first one to a PDF.
            ConversionResult result = await prizmDocServer.ConvertToPdfAsync(new ConversionSourceDocument("project-proposal.docx", pages: "2-"));

            // Save the result to "output.pdf".
            await result.RemoteWorkFile.SaveAsync("output.pdf");
        }
    }
}
Want more info on our PrizmDoc Server SDK? View our SDK Documentation to learn more.Not using .NET? View our API Documentation to use our advanced features with other languages.