With GroupDocs.Merger, shift EPUB pages. This feature, plus others, adds reliable document tools to Python via .NET apps.
- Load the EPUB file.
- Select the page to tweak.
- Change its orientation.
- Save the result.
With GroupDocs.Merger, shift EPUB pages. This feature, plus others, adds reliable document tools to Python via .NET apps.
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")
GroupDocs.Merger for Python via .NET offers a wide range of tools to manage content in 50+ file formats, delivering fast and smooth results.
Merge PDFs, Word docs, slides, spreadsheets, Visio files, images, and archives. Tailor it for the best output.
Relocate, swap, or remove pages to improve your document setup.
Turn pages to an angle or switch between portrait and landscape modes.
Take a page or group of pages and save them as a new file anywhere.
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")
Download GroupDocs.Merger for free or get a trial license for full access!
Explore documentation, code samples, and community support to enhance your experience.
Look at the tools that can improve your projects.
GroupDocs.Merger works with 50+ file types, giving you flexible ways to adjust documents.