.NET PDF Examples
Split PDFs in C# with the .NET PDF Library
The Syncfusion® .NET PDF Library offers powerful capabilities for creating, reading, and editing PDF documents. Users can split PDF files into multiple smaller documents, enabling easier content organization and selective extraction.
Watch this video to see how to split PDF files using the Syncfusion .NET PDF Library.
Split PDF documents into separate files in C#
Learn how to programmatically split large PDF documents into individual pages or smaller files in C# using the Syncfusion .NET PDF Library. This guide demonstrates page-level PDF splitting and extraction.
Step 1: Create a new C# Console Application project
Begin by creating a new C# Console Application project in Visual Studio or your preferred IDE to implement PDF splitting functionality.
Step 2: Install Syncfusion PDF NuGet package
Install the Syncfusion.Pdf.Net.Core NuGet package in your C# project from NuGet.org. This package provides APIs for splitting PDF documents into separate files.
Step 3: Add required s for PDF splitting
Import the following namespace in your Program.cs file to access PDF document parsing and page manipulation methods:
using Syncfusion.Pdf.Parsing;Step 4: Load the PDF document to split
Use the PdfLoadedDocument class to load your existing PDF file that contains multiple pages you want to split into separate documents.
//Load the PDF document
using (PdfLoadedDocument loadedDocument = new PdfLoadedDocument(Path.GetFullPath(@"Data/Input.pdf")))
{
}Step 5: Split the PDF into individual page documents
Use the Split method to separate each page of the PDF into individual documents. The method accepts a file path pattern with {0} as a placeholder for the page number.
//Split the pages into separate documents
loadedDocument.Split(Path.GetFullPath(@"Output/Output"+ "{0}.pdf"));GitHub project
NuGet installation
Get started quickly by downloading the installer and checking license information on the Downloads page.
Explore these resources for comprehensive guides, knowledge base articles, insightful blogs, and ebooks.
Learning
Technical Support
