GroupDocs.Merger for Python via .NET

Page alignment for EPUB

GroupDocs.Merger for Python via .NET enhances Python apps with useful features. Developers can build better solutions by managing file formats and tweaking EPUB page layouts.

How to adjust EPUB pages

With GroupDocs.Merger, shift EPUB pages. This feature, plus others, adds reliable document tools to Python via .NET apps.

  1. Load the EPUB file.
  2. Select the page to tweak.
  3. Change its orientation.
  4. Save the result.
import groupdocs.merger as gm

# Feed the file path to Merger
with gm.Merger("document.epub") as merger:
    
    # Target the page to adjust
    mode = gm.domain.options.OrientationMode.LANDSCAPE
    orientationOptions = gm.domain.options.OrientationOptions(mode, [1])

    # Apply the new orientation
    merger.change_orientation(orientationOptions)

    # Save the finished document
    merger.save("result.epub")
npm i @groupdocs/groupdocs.merger
click to copy
copied
More examples Documentation

Adaptable document handling

GroupDocs.Merger for Python via .NET offers a wide range of tools to manage content in 50+ file formats, delivering fast and smooth results.

GroupDocs.Merger options

Combine various formats

Merge PDFs, Word docs, slides, spreadsheets, Visio files, images, and archives. Tailor it for the best output.

Sort document pages

Relocate, swap, or remove pages to improve your document setup.

Set page alignment

Turn pages to an angle or switch between portrait and landscape modes.

Export pages separately

Take a page or group of pages and save them as a new file anywhere.

Shift the last EPUB page

Learn to check the page count in a EPUB file and adjust its final page.

JavaScript

import groupdocs.merger as gm

# Load the file into the constructor
with gm.Merger("document.epub") as merger:
  
    # Count the total pages
    info = merger.get_document_info()
    lastPage = info.page_count

    # Pick the page and set portrait or landscape
    mode = gm.domain.options.OrientationMode.LANDSCAPE
    orientationOptions = gm.domain.options.OrientationOptions(mode, lastPage, lastPage)

    # Update the page layout
    merger.change_orientation(orientationOptions)

    # Save to your chosen path
    merger.save("result.epub")
npm i @groupdocs/groupdocs.merger
click to copy
copied
More examples Documentation

GroupDocs.Merger Overview

GroupDocs.Merger for Python via .NET is built to manage documents in over 50 formats, such as PDF, Word, Excel, PowerPoint, Visio, images, and archives. Merge, split, extract, shift, swap, remove, or adjust page layouts as needed.
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.

Top features

Look at the tools that can improve your projects.

Tune pages in many formats

GroupDocs.Merger works with 50+ file types, giving you flexible ways to adjust documents.

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