Skip to content
Guides

Split Pages

The steps to split pages are as follows:

  1. Create a new CPDFDocument object for each part to be split.
  2. Add the portions of the target document that need to be split to the newly created CPDFDocument objects.

This example shows how to split pages:

C#
CPDFDocument documentPart1 = CPDFDocument.CreateDocument();
// Split the first and second pages into separate sections.
documentPart1.ImportPagesAtIndex(document, "1-2", 0); 

CPDFDocument documentPart2 = CPDFDocument.CreateDocument();
// Split the third, fourth, and fifth pages into the second section.
documentPart2.ImportPagesAtIndex(document, "3-5", 0);