PDF Splitter

The Documentize PDF Splitter for .NET is a powerful tool that simplifies the process of splitting large PDF documents into smaller, more manageable files. Whether you need to extract individual pages or divide a document into specific sections, this plugin allows you to achieve it efficiently and with minimal effort.

Key Features:

  • Split PDF by Page: Break down a PDF document into individual pages.
  • Batch Processing: Split large batches of PDFs in one go.
  • Custom Split Options: Configure the splitting process based on your requirements.
  • Organized Output: Easily manage the output files for each split page or section.

How to Split PDF Documents

To split a PDF document into individual pages, follow these steps:

  1. Create an instance of the Splitter class.
  2. Create an instance of SplitOptions to configure the splitting options.
  3. Add the input PDF file using the AddInput method.
  4. Add output files for each split page using the AddOutput method.
  5. Run the Process method to split the document.
 1var splitter = new Splitter();
 2var splitOptions = new SplitOptions();
 3
 4// Add the input PDF file
 5splitOptions.AddInput(new FileDataSource(@"C:\Samples\input.pdf"));
 6
 7// Specify output files for each page
 8splitOptions.AddOutput(new FileDataSource(@"C:\Samples\output_page_1.pdf"));
 9splitOptions.AddOutput(new FileDataSource(@"C:\Samples\output_page_2.pdf"));
10splitOptions.AddOutput(new FileDataSource(@"C:\Samples\output_page_3.pdf"));
11
12// Process the split operation
13splitter.Process(splitOptions);

Splitting PDF by Page Ranges

You can also split a PDF by specifying page ranges. This allows you to extract specific sections or multiple pages from a PDF into separate documents.

 1var splitter = new Splitter();
 2var splitOptions = new SplitOptions();
 3
 4// Add the input PDF
 5splitOptions.AddInput(new FileDataSource(@"C:\Samples\input.pdf"));
 6
 7// Define output for page ranges (e.g., pages 1-3)
 8splitOptions.AddOutput(new FileDataSource(@"C:\Samples\output_pages_1_to_3.pdf"));
 9
10// Process the split
11splitter.Process(splitOptions);

How to Handle Batch Splitting

The PDF Splitter plugin is optimized to handle large batches of PDF documents. You can split hundreds of PDFs into individual pages or sections by leveraging batch processing.

 1var splitter = new Splitter();
 2var splitOptions = new SplitOptions();
 3
 4// Add input PDF files in a batch
 5splitOptions.AddInput(new FileDataSource(@"C:\Samples\file1.pdf"));
 6splitOptions.AddInput(new FileDataSource(@"C:\Samples\file2.pdf"));
 7
 8// Define the output for each file
 9splitOptions.AddOutput(new FileDataSource(@"C:\Samples\output_file1_page1.pdf"));
10splitOptions.AddOutput(new FileDataSource(@"C:\Samples\output_file2_page1.pdf"));
11
12// Process the batch split
13splitter.Process(splitOptions);
 English