Use GroupDocs.Merger to modify EPUB page layouts. This and other tools bring strong document handling to Node.js via Java apps.
- Provide the EPUB file path.
- Choose the page to work on.
- Switch its orientation.
- Save the output.
Use GroupDocs.Merger to modify EPUB page layouts. This and other tools bring strong document handling to Node.js via Java apps.
const mergerLib = require('@groupdocs/groupdocs.merger')
// Load the file into Merger
const merger = new mergerLib.Merger("document.epub")
// Select the page to adjust
const mode = groupdocs.merger.OrientationMode.Landscape
const orientationOptions = new groupdocs.merger.OrientationOptions(mode, 1, 1)
// Pick the orientation you want
merger.changeOrientation(orientationOptions)
// Save the changes
merger.save("result.epub")
GroupDocs.Merger for Node.js via Java provides a solid toolkit for managing content across 50+ file formats with quick and dependable results.
Link up PDFs, Word files, presentations, spreadsheets, Visio diagrams, images, and archives. Adjust settings for a perfect fit.
Move, swap, or drop pages to shape your document flow.
Rotate pages to an angle or toggle between portrait and landscape views.
Select pages and export them as a standalone file to any spot.
const mergerLib = require('@groupdocs/groupdocs.merger')
// Open the file in the constructor
const merger = new mergerLib.Merger("document.epub");
// Get the page count
const info = merger.getDocumentInfo()
const lastPage = info.getPageCount()
// Choose the page and set portrait or landscape
const mode = groupdocs.merger.OrientationMode.Landscape
const orientationOptions = new groupdocs.merger.OrientationOptions(mode, lastPage, lastPage)
// Update the orientation
merger.changeOrientation(orientationOptions)
// Save the file to a new 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.
Discover tools to power up your solutions.
GroupDocs.Merger supports over 50 file types, letting you refine documents with a broad set of options.