PDF split library v10.0.0

PDF Split for .NET

With PDF Split you can extract a range of pages, a page list or the odd or even pages of a PDF document, or split it into chunks of a given number of pages, at its bookmarks or by file size. Open password-protected documents, secure the results, and write them to disk or to memory.

Add PDF split capabilities to your ASP.NET, Windows Forms or console application with the royalty free .NET library, or start from the command line sample.

NuGet · ExpertPdf.SplitPdf C# & VB.NET samples included
Input A PDF file or byte array
Output Chunks or a page range
Targets .NET Framework to .NET 11

Everything PDF Split does.

One PDF document in, smaller PDF documents out: a range of pages, or chunks of a given size, written to disk or to memory.

Splitting

How the document is split.

A range of pages, or chunks with a given number of pages each, and the page count of the source document.

Split into chunks

Split the PDF document into chunks, each containing a specified number of pages. Extract a given number of chunks, or continue to the end of the document.

Extract specific pages

Extract a range of pages, given by the start page and the number of pages, to a new PDF document.

Page lists, odd and even pages

Extract a list such as 1-3,7,10- (a backwards range reverses the pages), or only the odd or the even pages.

Split at bookmarks

One document per top-level bookmark, named after the chapter; each result carries its title and the source page numbers.

Split by file size

Split into documents of consecutive pages, each at most a given number of bytes, for email attachments or upload limits.

Count the pages

Get the number of pages of a PDF document, from a file or from a byte array.

Compression level

Set the PDF compression level of the documents created by the split.

Protected sources, secured results

Open password-protected documents, and give the new documents passwords, permissions and RC4 or AES encryption with 40, 128 or 256 bit keys.

Document information

Set the title, author, subject, keywords and creation date of the new documents.

Output & tools

Where the pages go.

Disk or memory, from a library you add to your application or from a command line tool.

Extract to disk

Save the extracted pages to a file. When splitting into chunks, each chunk is saved to a file whose name contains the chunk index.

Extract to a memory stream

Get each resulting document in memory, as a byte array, ready to pass to your other code or to the other ExpertPdf tools.

.NET library and samples

Royalty free development libraries for ASP.NET, Windows Forms and console applications, with C# and VB.NET samples.

Command line sample

A command line sample, with full C# and VB.NET source for .NET Framework and a .NET 10 version, for splitting and extracting PDF documents.

One PDF in. Many out.

Create a PDFSplitManager object and call one of its extract methods. Every method has a version for files and a version for byte arrays.

Program.cs · C#
using ExpertPdf.PDFSplit;

var splitManager = new PDFSplitManager();
splitManager.LicenseKey = "your license key";

string source = @"C:\Docs\report.pdf";
int pageCount = splitManager.GetPdfPageCount(source);

// Extract 5 pages, starting with page 5, to a new PDF document
splitManager.ExtractPagesFromFileToFile(source, @"C:\Docs\section.pdf", 5, 5);

// Split into chunks of 3 pages, from page 1 to the end of the
// document. Each chunk file name gets the chunk index.
splitManager.ExtractPagesFromFileToFile(source, @"C:\Docs\part.pdf", 1, 3, true);

Install with dotnet add package ExpertPdf.SplitPdf, or reference epsplitpdf.dll from the download. The API reference describes every class and method.

Split questions, answered.

Common questions about splitting modes, page ranges and output.

How can a PDF document be split?
Extract a range of pages, a page list such as 1-3,7,10-, or the odd or even pages to a new PDF document; split the document into chunks with a given number of pages each; split it at its top-level bookmarks, one document per chapter; or split it into documents of at most a given file size.
Can it open password-protected documents?
Yes. Set SourcePdfPassword to the user or owner password of the source. The new documents can get their own passwords and permissions through PdfSecurityOptions, and their own title and author through PdfDocumentInfo.
How many chunks are created?
You choose: give the number of chunks to extract, or extract chunks until the end of the document is reached.
Can I get the page count?
Yes. GetPdfPageCount returns the number of pages of a PDF file or of a PDF document given as a byte array.
Where do the extracted pages go?
To files or to memory. The ExtractPagesFromFileToFile, ExtractPagesFromFileToMemory, ExtractPagesFromMemoryToFile and ExtractPagesFromMemoryToMemory methods read the source from a file or a byte array and write the result to files or to PDFSplitDoc objects, whose Buffer property holds the PDF bytes.
Is there a command line tool?
Yes. A command line sample, with full C# and VB.NET source for .NET Framework and a .NET 10 version, splits and extracts PDF documents without writing code.
Which .NET versions are supported?
.NET Framework, .NET Core and .NET 5 to .NET 11, in ASP.NET, Windows Forms and console applications. The download has the libraries for .NET 2.0, .NET 4.0 and .NET Standard 2.0, the last one for .NET Core and .NET 5 to .NET 11. The library runs on Windows.
Can I try it before buying?
Yes. Download the free trial with the C# and VB.NET samples, and license it on the pricing page when you are ready.

Split PDF documents from .NET.

Download the free trial with C# and VB.NET samples and the command line utility. When you are ready, license SplitPDF on the pricing page.

Targets.NET Framework · .NET Core · .NET 5 to 11
Versionv10.0.0