ByteScout Premium Suite - C# - Merge two pdf documents with pdf sdk - ByteScout
Announcement
Our ByteScout SDK products are sunsetting as we focus on expanding new solutions.
Learn More Open modal
Close modal
Announcement Important Update
ByteScout SDK Sunsetting Notice
Our ByteScout SDK products are sunsetting as we focus on our new & improved solutions. Thank you for being part of our journey, and we look forward to supporting you in this next chapter!

ByteScout Premium Suite – C# – Merge two pdf documents with pdf sdk

  • Home
  • /
  • Articles
  • /
  • ByteScout Premium Suite – C# – Merge two pdf documents with pdf sdk

How to merge two pdf documents with pdf sdk in C# using ByteScout Premium Suite

Learn to code in C# to merge two pdf documents with pdf sdk with this step-by-step tutorial

The sample source code below will teach you how to merge two pdf documents with pdf sdk in C#. ByteScout Premium Suite can merge two pdf documents with pdf sdk. It can be applied from C#. ByteScout Premium Suite is the set that includes 12 SDK products from ByteScout including tools and components for PDF, barcodes, spreadsheets, screen video recording.

This prolific sample source code in C# for ByteScout Premium Suite contains various functions and other necessary options you should do calling the API to merge two pdf documents with pdf sdk. Simply copy and paste in your C# project or application you and then run your app! Check C# sample code samples to see if they respond to your needs and requirements for the project.

You can download free trial version of ByteScout Premium Suite from our website to see and try many others source code samples for C#.

On-demand (REST Web API) version:
 Web API (on-demand version)

On-premise offline SDK for Windows:
 60 Day Free Trial (on-premise)

Program.cs
      
using System.Diagnostics; using Bytescout.PDF; namespace CopyPagesFromOneDocumentToAnother { class Program { static void Main(string[] args) { // Open first document Document document1 = new Document("document1.pdf"); document1.RegistrationName = "demo"; document1.RegistrationKey = "demo"; // Open second document Document document2 = new Document("document2.pdf"); document2.RegistrationName = "demo"; document2.RegistrationKey = "demo"; // Add pages from document2 to document1 for (int i = 0; i < document2.Pages.Count; ++i) { document1.Pages.Add(document2.Pages[i]); } // Save merged document document1.Save("MergedDocument.pdf"); // Open result document in default associated application (for demo purpose) ProcessStartInfo processStartInfo = new ProcessStartInfo("MergedDocument.pdf"); processStartInfo.UseShellExecute = true; Process.Start(processStartInfo); } } }

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Premium Suite Home Page

Explore ByteScout Premium Suite Documentation

Explore Samples

Sign Up for ByteScout Premium Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

VIDEO

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Premium Suite Home Page

Explore ByteScout Premium Suite Documentation

Explore Samples

Sign Up for ByteScout Premium Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next