GroupDocs.Merger for Python via .NET

Split WORD files into parts

GroupDocs.Merger for Python via .NET enhances Python applications with advanced document processing. Split WORD files effortlessly and work with a variety of commonly used formats.

How to break WORD documents into parts

GroupDocs.Merger makes it easy to split WORD files, extracting selected pages and saving them as a new document. Integrate efficient document processing into your Python via .NET applications.

  1. Specify the original WORD file path.
  2. Choose where to save the output file.
  3. Configure the split operation settings.
  4. Process and save the separated document.
import groupdocs.merger as gm

# Load the input document into Merger
with gm.Merger("document.docx") as merger:
    
    # Define the output file path
    outPath = "result.docx"

    # Set up split options
    splitOptions = gm.domain.options.SplitOptions(outPath, [1])

    # Execute the split operation
    merger.split(splitOptions)
npm i @groupdocs/groupdocs.merger
click to copy
copied
More examples Documentation

Advanced document management

GroupDocs.Merger for Python via .NET offers a powerful toolkit for efficiently processing over 50 popular file formats.

Core capabilities of GroupDocs.Merger

Merge different document types

Combine PDFs, Word documents, spreadsheets, presentations, Visio drawings, images, and archive files. Apply customization settings for precise output.

Rearrange document structure

Modify document layout by moving, swapping, or deleting pages to organize content more effectively.

Adjust page orientation

Rotate pages to any angle or switch between portrait and landscape orientations.

Extract selected pages

Choose specific pages or page ranges and save them as a separate document.

Extract even pages from a WORD file

This example demonstrates how to split a WORD file and save all even-numbered pages into a new document.

JavaScript

import groupdocs.merger as gm

# Open the source document
with gm.Merger("document.docx") as merger:
  
    # Specify the output file destination
    outPath = "result.docx"

    # Determine the total page count
    info = merger.get_document_info()
    lastPage = info.page_count

    # Set up split options for even pages
    rangeMode = gm.domain.options.RangeMode.EvenPages
    splitOptions = gm.domain.options.SplitOptions(outPath, 1, lastPage, rangeMode)

    # Perform the split and save the output
    merger.split(splitOptions)
npm i @groupdocs/groupdocs.merger
click to copy
copied
More examples Documentation

What is GroupDocs.Merger?

GroupDocs.Merger for Python via .NET is a feature-rich document processing library supporting 50+ file types, including PDF, Word, Excel, PowerPoint, Visio, images, and archives. It allows developers to merge, split, extract, rearrange, swap, and remove pages, streamlining document operations within applications.
Learn more
About illustration

Ready to get started?

Download GroupDocs.Merger for free or get a trial license for full access!

Useful resources

Explore documentation, code samples, and community support to enhance your experience.

Main features

Explore the key capabilities of our document processing library.

Split multiple document formats

GroupDocs.Merger supports over 50 file types, making it easy to modify documents with precision.

Temporary license tips

1
Sign up with your work email.
Free mail services are not allowed.
2
Use Get a temporary license button on the second step.
 English