ByteScout PDF SDK - C# - Insert Page to PDF - ByteScout

ByteScout PDF SDK – C# – Insert Page to PDF

  • Home
  • /
  • Articles
  • /
  • ByteScout PDF SDK – C# – Insert Page to PDF

How to Insert Page to PDF in C# and ByteScout PDF SDK

Learning is essential in the computer world and the tutorial below will demonstrate how to insert page to PDF in C#

The sample shows instructions and algorithms on how to insert a page to PDF and how to make it run in your C# application. What is ByteScout PDF SDK? It is the pdf library that can create, update and modify PDF files. Supports text with fonts and style selections, layers, form fields, drawing lines and objects, automatic tables, images. Can be used to create and fill pdf forms. It can help you to insert a page to PDF in your C# application.

These C# code samples for C# guide developers to speed up the coding of the application when using ByteScout PDF SDK. This C# sample code is all you need for your app. Just copy and paste the code, add references (if needs to be) and you are all set! The use of ByteScout PDF SDK in C# is also described in the documentation included along with the product.

The trial version of ByteScout PDF SDK is available for free. Source code samples are included to help you with your C# app.

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 InsertPageToPDF { 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"; // Page index to insert document int pageIndexToAdd = 1; // Add pages from document2 to document1 for (int i = 0; i < document2.Pages.Count; ++i) { document1.Pages.Insert((pageIndexToAdd++), 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 PDF SDK Home Page

Explore ByteScout PDF SDK Documentation

Explore Samples

Sign Up for ByteScout PDF SDK 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 PDF SDK Home Page

Explore ByteScout PDF SDK Documentation

Explore Samples

Sign Up for ByteScout PDF SDK Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next