How to Merge EPUB files?
Aspose.HTML for .NET offers you tools to merge EPUB files online or programmatically via C#. Online EPUB Merger allows you to merge multiple EPUB files into a single document in real-time right in your browser. If you want to use merging and conversion functionalities in your product or to merge EPUB programmatically, please download Aspose.HTML C# library, learn our documentation and consider the C# code examples. Powerful C# API allows you to merge EPUB files quickly and in high quality.
Online EPUB Merger
Test the quality of EPUB Merger right in your browser! Please load EPUB files from the local file system, select the required output format and run the example! It’s fast, easy, secure, and completely free! You will immediately get the result as a separate file. So, quickly merge EPUB files and save the result to PDF, XPS, DOCX, or TIFF format online!
// Open an existing EPUB files for reading using var stream1 = File.OpenRead(DataDir + "input1.epub"); using var stream2 = File.OpenRead(DataDir + "input2.epub"); // Create an instance of EPUB Renderer using var renderer = new Aspose.Html.Rendering.EpubRenderer(); // Create an instance of PDF device using var device = new Aspose.Html.Rendering.Pdf.PdfDevice("output-epub.pdf"); // Merge all EPUB documents into PDF renderer.Render(device, stream1, stream2);
Steps to Merge EPUB to PDF in C#
Aspose.HTML for .NET API provides the Renderer class for rendering and merging EPUB documents. Using the Renderer instances directly, you can send multiple files to the output rendering device at once. Aspose.HTML API provides the following implementation of renderers: HtmlRenderer, SvgRenderer, MhtmlRenderer and EpubRenderer, which are used to render HTML, SVG, MHTML and EPUB documents, respectively.
Please see the C# example above if you would like to merge EPUB fils programmatically:
- Open an existing EPUB files.
- Create an instance of EPUB Renderer. Use the EpubRenderer() constructor.
- In this step, you can choose a rendering device. API provides the following implementations: PdfDevice, XpsDevice, DocDevice and ImageDevice, which are used to generate PDF, XPS, DOCX and Image file formats, respectively.
- If you want to merge EPUB to PDF, create a PDF device. Use the PdfDevice() constructor to initialise a new instance of the PdfDevice class.
- Call the Render() method to merge all EPUB documents into PDF.
- Copy C# code for EPUB files merging and use it in your project.
1. Why is this EPUB Merger useful?
EPUB Merger is a practical, powerful and fast tool to combine several EPUB files. You can quickly and easily merge EPUB documents into one and save the result in PDF, XPS, DOCX, and TIFF formats without any hassle!
2. How can I merge EPUB?
You can merge EPUB online or programmatically. To merge HTML online, please load files from your local file system or a URL, select the required output format from the list and run the example! You will immediately get the result. Moreover, you can copy C# code and use it on your own application for file merging.
3. Can I merge EPUB on Linux, Mac OS, iOS or Android?
You can use this free online EPUB Merger from a mobile device, tablet or computer. The interface of the Merger is very straightforward. Our tool is supported by all operating systems with a browser - Windows, Mac OS, Linux, Android, and iOS. There is no requirement to install any additional tool to support this tool running.
What is EPUB File Format
EPUB is an e-book file format that provides a standard digital publication format for publishers and consumers. EPUB files can store words, images, stylesheets, fonts, metadata details, and tables of content. 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 support for opening such files. In addition, there is a lot of compatible software available for smartphones, tablets and computers. EPUB file standards are maintained by the International Digital Publishing Forum (IDPF).
How to Install Aspose.HTML for .NET library
You can use several ways to install the Aspose.HTML library for .NET on your system:
- Install a NuGet Package using the NuGet Package Manager GUI.
- Install a NuGet Package using the Package Manager Console. You may use the following command
PM> Install-Package Aspose.Html.
- Install Aspose.HTML for .NET through MSI.