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)
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); } } }
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
Get Your API Key
Explore Web API Docs
Explore Web API Samples
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
Get Your API Key
Explore Web API Docs
Explore Web API Samples
also available as: