Split a PDF file by page ranges or extract all PDF pages to multiple PDF files.
PDF splitter is a very simple and lightning-quick library that lets you split any Adobe PDF into smaller size, high portability and powerful security PDF files. No matter what on the page(such as image, table, chart, annotation, chapter, list, etc.), all the content in one page will be divided to a new PDF document.
PDF splitter service enables you to split PDF documents with ease, even with password-protected PDF file. With the detached PDF files, developers can combine any from them, or merge them to other PDF files, if needed.
Using this C#.NET PDF document splitting library control, C# developers can easily and accurately depart multi-page PDF document into two or more separate PDF files by page(s).
// Open the original pdf file PdfDocument inputDocument = PdfReader.Open("file1.pdf", PdfDocumentOpenMode.Import); string saveName = "Split Doc"; for (int i = 0; i < inputDocument.PageCount; i++) { // Create new document PdfDocument splitDocument = new PdfDocument(); // Add the same meta from input file to split file splitDocument.Version = inputDocument.Version; splitDocument.Info.Title = "Page " + (i + 1); splitDocument.Info.Creator = inputDocument.Info.Creator; // Add the page and save it splitDocument.AddPage(inputDocument.Pages[i]); splitDocument.Save(String.Format("{0} - Page {1}.pdf", saveName, i + 1)); }