Split PDF into parts in C#

Fast C# library to split one PDF file into a group of smaller files according to the given criteria.

Use .NET library to split PDF files into parts. You can integrate the extracted PDF pages with other data and, as a result, get documents of the form and content that you require. Splitting PDF into parts makes it easier to collaborate on PDF files.

View code snippet

Unlock the power of document organization with a comprehensive C# library designed to split PDF documents into separate files. Whether you are integrating PDF pages into automated information systems or databases, this standalone solution for .NET provides a seamless and efficient way to divide PDF files.

Choose from the following page extraction modes:

  • Split PDF by Headers. Extract sections based on document headers
  • Split PDF by Sections. Divide the document into logical sections
  • Split PDF Page by Page. Break down the document page by page
  • Split PDF by Page Ranges. Define custom page ranges for extraction

After splitting the PDF document, export the results to the preferred file format. Our C# library operates independently, without the need for additional installations of Microsoft Word, Acrobat Reader, or other software.

Interactive Split PDF in C# Demo

Discover the library's capabilities through the interactive demo. Explore the C# code performing document splitting: upload your PDF document, set operation options, and independently verify the result. Try it today and experience the efficiency of flexible PDF document splitting in .NET projects. The following example shows how to split PDF using C#:

C# code example to split a PDF file
Upload a file you want to split
Run code
Select the target format from the list
using Aspose.Words;

var doc = new Document("Input.pdf");
           
for (var page = 0; page < doc.PageCount; page++)
{
    var extractedPage = doc.ExtractPages(page, 1);
    extractedPage.Save($"Output_{page + 1}.pdf");
}
Run code

How to split PDF C#

  1. Install C# library to split PDF files programmatically.
  2. Add a library reference (import the library) to your C# project.
  3. Open the PDF in C#.
  4. Call the ExtractPages() method to extract specific pages from PDF.
  5. Get the result of PDF splitting as separate files.

C# library to split PDF documents

There are three alternative options to install "Aspose.Words for .NET" onto your system. Please choose one that resembles your needs and follow the step-by-step instructions:

System Requirements

Our product is fully cross-platform and supports all major .NET implementations:

  • .NET ≥ 5.0
  • .NET Core ≥ 2.0
  • .NET Standard ≥ 2.0
  • .NET Framework ≥ 3.5
  • MonoMac
  • MonoAndroid
  • Xamarin

As far as .NET code doesn't depend on the underlying hardware or operating system, but only on a Virtual Machine, you are free to develop any kind of software for Windows, macOS, Android, iOS and Linux. Just make sure you have installed the corresponding version of .NET Framework, .NET Core, Windows Azure, Mono or Xamarin.

We recommend using Microsoft Visual Studio, Xamarin, and MonoDevelop integrated development environments to create C#, F#, VB.NET applications.

Fore more details please refer to Product Documentation.

Other supported PDF split operations

You can also split PDF to other file formats:

5%

Subscribe to Aspose Product Updates

Get monthly newsletters and offers directly delivered to your mailbox.

© Aspose Pty Ltd 2001-2024. All Rights Reserved.