Use GroupDocs.Merger to adjust EPUB page orientation. This feature, along with others, brings solid document management to Java projects.
- Point to the EPUB source file.
- Select the page number to adjust.
- Update the page orientation.
- Save the changes.
Use GroupDocs.Merger to adjust EPUB page orientation. This feature, along with others, brings solid document management to Java projects.
// Load source file path into Merger
Merger merger = new Merger("document.epub");
// Pick the page to change orientation for
OrientationMode mode = OrientationMode.Landscape;
OrientationOptions orientationOptions
= new OrientationOptions(mode, new int[] { 1 });
// Set the page orientation as needed
merger.changeOrientation(orientationOptions);
// Save the updated document
merger.save("result.epub");
GroupDocs.Merger for Java offers a full set of tools to handle content in over 50 popular file formats with smooth, efficient processing.
Combine PDFs, Word files, slides, spreadsheets, Visio diagrams, images, and archives. Customize the process for the best outcome.
Rearrange pages by moving, swapping, or deleting them to organize your content better.
Rotate pages to a set angle or switch between portrait and landscape modes.
Pick a page or a range of pages and save them as a new file wherever you want.
// Load the source file into the constructor
Merger merger = new Merger("document.epub");
// Get the total page count
IDocumentInfo info = merger.getDocumentInfo();
int lastPage = info.PageCount;
// Set the page number and choose portrait or landscape
OrientationMode mode = OrientationMode.Landscape;
OrientationOptions orientationOptions = new OrientationOptions(mode, lastPage, lastPage);
// Apply the new orientation
merger.changeOrientation(orientationOptions);
// Save the updated file to an output 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.
Check out the features that can boost your projects.
GroupDocs.Merger works with over 50 file formats, making it easy to tweak documents with a variety of operations.