GroupDocs.Merger for Python via .NET

Extract EPUB pages

Enhance your Python applications with GroupDocs.Merger for Python via .NET, providing seamless page extraction for EPUB documents.

How to extract EPUB pages

GroupDocs.Merger makes it easy to extract pages from EPUB documents. Integrate seamless document processing into your Python via .NET applications.

  1. Specify the file path of the source EPUB document.
  2. Select the pages you want to extract.
  3. Run the extraction process.
  4. Save the extracted pages as a new document.
import groupdocs.merger as gm

# Initialize GroupDocs.Merger with the source document
with gm.Merger("document.epub") as merger:
    
    # Specify the pages to extract
    extractOptions = gm.domain.options.ExtractOptions([2])

    # Execute the extraction process
    merger.extract_pages(extractOptions)

    # Save the extracted pages as a new file
    merger.save("result.epub")
npm i @groupdocs/groupdocs.merger
click to copy
copied
More examples Documentation

Advanced document processing

GroupDocs.Merger for Python via .NET provides a wide range of tools to manage over 50 popular business file formats.

Key features of GroupDocs.Merger

Merge multiple file formats

Combine PDFs, Word documents, PowerPoint slides, Excel spreadsheets, images, and archives into a single document with flexible options.

Manage document pages

Easily reorder, move, or remove pages to structure your documents efficiently.

Modify page layout

Rotate pages to any angle or switch between portrait and landscape orientation as needed.

Extract selected pages

Choose and extract only the pages you need, saving them as a new document.

Extract specific pages from a document

This example shows how to extract a selected range of pages from a EPUB file and save them as a separate document.

JavaScript

import groupdocs.merger as gm

# Specify the file path of the source document
with gm.Merger("file_1.epub") as merger:
  
    # Set options to extract only even-numbered pages within a range
    rangeMode = gm.domain.options.RangeMode.EVEN_PAGES
    extractOptions = gm.domain.options.ExtractOptions(1, 3, rangeMode)

    # Perform the extraction operation
    merger.extract_pages(extractOptions)

    # Save the extracted pages as a new file
    merger.save("result.epub")
npm i @groupdocs/groupdocs.merger
click to copy
copied
More examples Documentation

About GroupDocs.Merger

GroupDocs.Merger for Python via .NET is a versatile document processing library that supports over 50 file formats, including PDF, Word, Excel, PowerPoint, and images. It enables you to merge, split, extract, rearrange, and delete pages effortlessly.
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.

Key features

Explore additional document processing capabilities.

Extract pages from various file formats

GroupDocs.Merger supports over 50 file formats, making document management easy and efficient.

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