With the Syncfusion .NET PDF library, you can easily split PDF files. This is especially handy for dealing with large documents like reports or manuals, which can be tricky to manage and share. By breaking these big files into smaller parts, sharing and accessing the specific information you need becomes much simpler.
The split PDF feature works seamlessly across platforms, including Windows, macOS, Linux, Android, and iOS through any .NET-based applications, such as ASP.NET Core, ASP.NET MVC, Blazor, .NET MAUI, Xamarin, WinForms, WPF, and WinUI.
This sample code shows how to split PDF files using the Syncfusion .NET PDF library. With just a few lines of code, you can split a large PDF document into several PDF files, each containing a single page.
//Add the required namespaces
using Syncfusion.Pdf.Parsing;
using Syncfusion.Pdf;
// Create the FileStream object to read the input PDF file
using (FileStream inputFileStream = new FileStream("Input.pdf", FileMode.Open, FileAccess.Read))
{
// Load the PDF document from the input stream
using (PdfLoadedDocument loadedDocument = new PdfLoadedDocument(inputFileStream))
{
// Iterate over the pages of the loaded document
for (int pageIndex = 0; pageIndex < loadedDocument.PageCount; pageIndex++)
{
// Create a new PdfDocument object to hold the output
using (PdfDocument outputDocument = new PdfDocument())
{
// Import the page from the loadedDocument to the outputDocument
outputDocument.ImportPage(loadedDocument, pageIndex);
// Create the FileStream object to write the output PDF file
using (FileStream outputFileStream = new FileStream($"Output{pageIndex}.pdf", FileMode.Create, FileAccess.Write))
{
// Save the outputDocument into the outputFileStream
outputDocument.Save(outputFileStream);
}
}
}
}
}
Discover how the Split PDF feature simplifies document management by breaking it into smaller components.
Separate specific pages or page ranges from a PDF document into individual files. This improves file organization and collaboration while preserving the integrity of the original PDF.
Programmatically select single or multiple pages from the document based on criteria such as page number and content and save them as a single PDF document.
Divide PDF documents into smaller segments based on a fixed number of pages.
Splitting a PDF document based on bookmarks offers a straightforward method for extracting bookmarked pages.
While splitting the PDF document, the file size is optimized by removing unused resources without altering any content.
While splitting the PDF document, accessibility tags are extracted from the parent document, ensuring compatibility with the structured PDF document.
Discover valuable resources from our blog and knowledge base to enhance your efficiency in Splitting PDF.
Knowledge base
Explore these resources for comprehensive guides, knowledge base articles, insightful blogs, and ebooks.
Product Updates
Technical Support
PDF splitting is the process of dividing a single PDF file into multiple separate PDF files, each containing a portion of the original document.
No, splitting a PDF does not alter the original file. It creates new PDF files based on the specified splitting criteria, leaving the original PDF intact.
Yes, if you’ve split a PDF into multiple files, you can typically merge them back together using the PDF merge feature.
You might need to split a PDF to extract specific pages, separate chapters or sections, or share only relevant portions of a document.
Common criteria for splitting PDFs include specific pages, page range, page count, and bookmarks.
The PDF splitting feature of the Syncfusion .NET PDF library is secure as it maintains the integrity of the original PDF document and its contents without making any alterations.
Greatness—it’s one thing to say you have it, but it means more when others recognize it. Syncfusion is proud to hold the following industry awards.