Convert MHTML to XPS – Cloud SDKs and REST API
MHTML to XPS
Aspose.HTML Cloud v4.0 provides the simplest API to convert MHTML documents to XPS format with high quality, easy and fast.
The article explains in a set of code examples how to convert an MHTML document to XPS using Aspose.HTML Cloud client SDKs and REST API calls. SDKs are available in PHP, C++, Ruby, Python, C#, Java, Android, Swift, and Node.js. We will consider various scenarios of MHTML to XPS conversion.
SDK Examples of MHTML to XPS Conversion
A widespread use case for Aspose.HTML Cloud SDK functions is file processing and converting. Cloud SDK allows you to fetch an MHTML 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 storage or your local drive. The following code examples demonstrate how to convert MHTML to XPS for different cases using available SDKs and cURL.
Example 1. Convert MHTML file to XPS with default save options
MHTML 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 MHTML to XPS with explicitly specified options
The example below demonstrates how to convert an MHTML file from a 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 MHTML files are in the SDK Conversion Options section.
Example 3. Convert MHTML to XPS inside cloud storage
Aspose.HTML Cloud allows you to get an MHTML file from your cloud storage and save conversion result back to cloud storage. The conversion occurs with default conversion options.
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 HTML to PDF Converter that swiftly converts HTML to PDF with high quality. Just upload your files, convert them, and get the result in a few seconds!