Convert EPUB to XPS using Cloud SDK – Aspose.HTML

Aspose.HTML Cloud offers a simple API for quickly and efficiently converting EPUB documents to XPS format. 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.

The article explains in a set of code examples how to convert an EPUB document to XPS using Aspose.HTML Cloud client SDKs and REST API calls. We will consider various scenarios of EPUB to XPS conversion. SDKs are available in PHP, C++, Ruby, Python, C#, Java, Android, Swift, and more.

SDK Examples of EPUB to XPS Conversion

A widespread use case for Aspose.HTML Cloud SDK functions is file processing and converting. Cloud APIs 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 XPS for different cases using available SDKs and cURL.

Example 1. Convert EPUB to XPS

EPUB to XPS conversion occurs with the default conversion options: the resulting XPS document’s width and height correspond to A4, and all margins have zero value.

Example 2. Convert EPUB from the local file system to XPS with explicitly specified options and save to the local path

The example below demonstrates how to convert an EPUB file from the local file system to XPS with explicitly specified options and save the result back to the local path.

More details about available conversion parameters for EPUB files are in the SDK Conversion Options section.

Example 3. Convert EPUB to XPS 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