GroupDocs.Merger for .NET

Page orientation tweaks for EPUB

GroupDocs.Merger for .NET brings practical tools to .NET apps. Developers can upgrade their projects by managing key file formats and adjusting EPUB page layouts.

How to tweak EPUB page orientation

With GroupDocs.Merger, adjust EPUB page layouts. This feature and others offer smart document control for .NET projects.

  1. Load the EPUB file location.
  2. Pick the page to modify.
  3. Update its orientation.
  4. Store the result.
// Point Merger to the source file
using (Merger merger = new Merger("document.epub"))
{
    // Choose the page for layout changes
    OrientationMode mode = OrientationMode.Landscape;
    OrientationOptions orientationOptions 
        = new OrientationOptions(mode, new int[] { 1 });

    // Set the new page orientation
    merger.ChangeOrientation(orientationOptions);

    // Save your updated file
    merger.Save("result.epub");
}
dotnet add package GroupDocs.Merger
click to copy
copied
More examples Documentation

Versatile document management

GroupDocs.Merger for .NET delivers a strong lineup of tools for managing content in over 50 file formats with fast, reliable performance.

GroupDocs.Merger capabilities

Blend multiple file types

Fuse PDFs, Word docs, slides, spreadsheets, Visio files, images, and archives. Fine-tune the process for great results.

Organize document pages

Shift, swap, or cut pages to streamline your document structure.

Adjust page setup

Turn pages to a custom angle or flip between portrait and landscape.

Pull pages into new files

Grab one page or a batch and save them as a fresh file anywhere.

Change orientation of the last EPUB page

See how to count pages in a EPUB file and flip the last page’s orientation.

C#

// Feed the file into the constructor
using (Merger merger = new Merger("document.epub"))
{
    // Fetch the page total
    IDocumentInfo info = merger.GetDocumentInfo();
    int lastPage = info.PageCount;

    // Set the page number and pick portrait or landscape
    OrientationMode mode = OrientationMode.Landscape;
    OrientationOptions orientationOptions = new OrientationOptions(mode, new int[] { lastPage });

    // Apply the orientation changes
    merger.ChangeOrientation(orientationOptions);

    // Save to an output location
    merger.Save("result.epub");
}
dotnet add package GroupDocs.Merger
click to copy
copied
More examples Documentation

GroupDocs.Merger Overview

GroupDocs.Merger for .NET is a toolset for handling documents across 50+ formats, including PDF, Word, Excel, PowerPoint, Visio, images, and archives. Merge, split, extract, reposition, swap, remove, or rotate pages to suit your needs.
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.

Core features

See the tools that can enhance your work.

Modify page orientation across formats

GroupDocs.Merger handles 50+ file types, letting you adjust documents with ease using a range of functions.

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