ByteScout PDF SDK - C# - Reorder Pages in PDF - ByteScout

ByteScout PDF SDK – C# – Reorder Pages in PDF

  • Home
  • /
  • Articles
  • /
  • ByteScout PDF SDK – C# – Reorder Pages in PDF

How to reorder pages in PDF in C# using ByteScout PDF SDK

Write code in C# to reorder pages in PDF with this step-by-step tutorial

The sample source codes on this page shows how to reorder pages in PDF in C#. ByteScout PDF SDK can reorder pages in PDF. It can be used from C#. ByteScout PDF SDK is the library for pdf documents generation, modification and updates. Can also generate and fill PDF forms. Provides support for text (fonts, style, size, font family), layers, pdf form fields, vector and raster drawings.

Fast application programming interfaces of ByteScout PDF SDK for C# plus the instruction and the code below will help you quickly learn how to reorder pages in PDF. In your C# project or application you may simply copy & paste the code and then run your app! Detailed tutorials and documentation are available along with installed ByteScout PDF SDK if you’d like to dive deeper into the topic and the details of the API.

Trial version of ByteScout PDF SDK can be downloaded for free from our website. It also includes source code samples for C# and other programming languages.

Try ByteScout PDF SDK today:  60 Day Free Trial (on-premise) or  Web API (on-demand version)

using Bytescout.PDF; using System; using System.Diagnostics; namespace RemovePdfProtection { class Program { static void Main(string[] args) { try { using (Document doc = new Document()) { doc.Load("sample.pdf"); // Swap first and second pages: Page tmp = doc.Pages[1]; doc.Pages.Remove(1); doc.Pages.Insert(0, tmp); //Save output file doc.Save("result.pdf"); } // Open result document in default associated application (for demo purpose) ProcessStartInfo processStartInfo = new ProcessStartInfo("result.pdf"); processStartInfo.UseShellExecute = true; Process.Start(processStartInfo); } catch (Exception ex) { Console.WriteLine(ex.Message); } Console.WriteLine("Press any key to exit..."); Console.ReadLine(); } } }

Try ByteScout PDF SDK today:  60 Day Free Trial (on-premise) or  Web API (on-demand version)



Get 60 Day Free Trial or Visit ByteScout PDF SDK Home Page

Explore ByteScout PDF SDK Documentation

Get ByteScout PDF SDK Free Training


Get Your Free API Key

Explore Web API Documentation