You can easily combine multiple EPUB files into one using GroupDocs.Merger library API and all the files content will be preserved. The following example demonstrates how to merge EPUB files with several lines of C# code:
- Create an instance of Merger class and pass source EPUB file path as a constructor parameter. You may specify absolute or relative file path as per your requirements.
- Add another EPUB file to merge with join method. Repeat this step for other EPUB documents you want to merge.
- Call Merger class save method and specify the filename for the merged EPUB file as parameter.
// Load the source EPUB file Merger merger = new Merger("c:\sample1.epub") // Add another EPUB file to merge merger.join("c:\sample2.epub"); // Merge EPUB files and save result merger.save("c:\merged.epub");
Files with .EPUB extension are an e-book file format that provide a standard digital publication format for publishers and consumers. The format has been so common by now that it is supported by many e-readers and software applications. For example, on Mac OS, the pre-installed Books software provides the support for opening such files. In addition, there are a lot of compatible software available for smartphones, tablets and computers.
Please find more use-cases and complete java sources of our backend and frontend examples and try them for free!
GroupDocs.Merger for Java provides an online EPUB Merger App, which allows you to try it for free and check its quality and accuracy.
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.