Convert EPUB to PDF using Cloud SDK – Aspose.HTML
Aspose.HTML Cloud provides the simplest API to convert EPUB to PDF with high quality, easy and fast. The EPUB format has gained popularity as an XML-based e-book format and designed to adapt the content’s presentation to the reader device. It is implemented as an archive file consisting of XHTML files carrying the content, images and other supporting files. PDF is basically a static document that can contain text, images, form-fields, media, digital signatures, hyperlinks, etc. One of the PDF benefits is your paper will be presented exactly how you designed it out, and it is ideal for sending documents that are intended to be printed out.
This article explains in a set of Aspose.HTML Cloud SDK examples how to convert EPUB to PDF. SDKs are available in PHP, C++, Python, C#, Ruby, Java, Android, Swift, and Node.js. We will consider various scenarios of EPUB to PDF conversion:
- Converting a local EPUB file to PDF and saving the result in your local file system. In this scenario, we will explore both conversions with default conversion parameters and with explicitly specified parameters.
- Converting EPUB to PDF in cloud storage with default conversion parameters.
Examples of EPUB to PDF Conversion
A widespread use case for Aspose.HTML Cloud functions is file processing and converting. Cloud SDK allows you to fetch an EPUB document from a storage location by its name or from a local file on your drive, convert it to a specified format and save it to the storage or the local drive. The following code examples demonstrate how to convert EPUB to PDF for different cases using available SDKs and REST API.
Example 1. Convert EPUB to PDF
Consider converting an EPUB document initially located on a local file system to PDF format. The EPUB to PDF conversion occurs with the default conversion options. The resultant file is then saved back to the local file system.
EPUB to PDF conversion occurs with the default conversion options: the resulting PDF document’s width and height correspond to A4, and all margins have zero value.
Example 2. Convert EPUB to PDF with explicitly specified options
The example below demonstrates how to convert an EPUB file from a local file system to PDF with explicitly specified options and save the result back to the file system.
More details about available conversion parameters for EPUB files are in the SDK Conversion Options section.
Example 3. Convert EPUB to PDF inside cloud storage
Aspose.HTML Cloud allows you to get an EPUB file from your cloud storage and save conversion result back to cloud storage.
See Also
- The Available SDKs article introduces you to Aspose.HTML Cloud’s ability to use SDKs in various programming languages, such as C#, Java, Python, Ruby, PHP, Node.js, Swift, Android, and C++.
- The SDK Conversion Options article describes a set of classes that represent options for converting a source HTML-based document to PDF, XPS, and image.
- Aspose.HTML Cloud API you can call directly from your browser by accessing the API Reference.
- Aspose.HTML offers a free online EPUB to PDF Converter that swiftly and high-quality converts EPUB to PDF. Just upload your files, convert them, and get the result in seconds!