Split Large Documents

Wordize Splitter for .NET splits large documents by pages, page ranges, sections, or styles and removes blank pages for better readability and reduced file size.
Supported Modules and Document Formats

Wordize supports splitting documents in any format:

  • to split documents, use the Wordize Splitting for .NET module
  • to work with documents in the required formats, select the appropriate document conversion module

Wordize provides the Wordize Splitting for .NET module, which allows users to split large documents into multiple smaller documents programmatically. This feature is useful for dividing large content into manageable sections on a page-by-page basis, as well as based on sections, page ranges, and paragraph styles.

Additionally, Wordize allows you to remove blank pages from your documents to improve readability and ensure a professional appearance, as well as reduce file size and prevent printing unnecessary pages.

Let’s look at each of these methods in more detail.

Split Page by Page

Wordize allows users to split a document by pages. To do this, you need to use the Page value of the SplitCriteria property in the SplitOptions class.

So, if you have a document of 5 pages, then using this method of splitting the document you will get 5 documents with 1 page each.

The following code example shows how to split a document by pages using the Split method:

var doc = "BigDocument.docx";

SplitOptions options = new SplitOptions();
options.SplitCriteria = SplitCriteria.Page;

Splitter.Split(doc, "SplitDocument.1.docx", options);
Important to note:
If the input document is PDF, the split criteria is Page, and the output document has a fixed page format (where the geometry of objects and their position on the page are fixed, such as PDF or image formats), for better performance and fidelity, the split is performed without reading PDF documents into the internal flow Document Object Model.

Split by Sections

Wordize also allows to use section breaks to split documents into sections. For this purpose, use the SectionBreak value of the SplitCriteria property in the SplitOptions class.

The following code example shows how to split a document into sections using the Split method:

var doc = "BigDocument.docx";

SplitOptions options = new SplitOptions();
options.SplitCriteria = SplitCriteria.SectionBreak;

Splitter.Split(doc, "SplitDocument.3.docx", options);

Split by Styles

Wordize allows you to split a document into parts by paragraph, formatted with a specific style. To split a document by paragraphs, use the Style value of the SplitCriteria property and define styles using the SplitStyle property.

The following code example shows how to split a document into parts by paragraph style using the Split method:

var doc = "BigDocument.docx";

SplitOptions options = new SplitOptions();
options.SplitCriteria = SplitCriteria.Style;
options.SplitStyle = "Heading 1";

Splitter.Split(doc, "SplitDocument.5.docx", options);

Split by Page Ranges

Wordize allows you to extract a specific page ranges from a multi-page document. Just select a range of pages and keep only that part of the original document using the ExtractPages method.

The following code example shows how to split a document by page ranges using the ExtractPages method:

var doc = "BigDocument.docx";

Splitter.ExtractPages(doc, "ExtractPages.1.docx", 0, 2);

Remove Blank Pages

You can also remove blank pages from the document using one of the RemoveBlankPages methods.

The following code example shows how to do this using the RemoveBlankPages method:

var doc = "BlankPages.docx";

Splitter.RemoveBlankPages(doc, "RemoveBlankPages.1.docx");

See Also