Convert Markdown to XPS – Cloud SDKs and REST API

Markdown to XPS

Aspose.HTML Cloud v4.0 provides the simplest API to convert MD documents to XPS format with high quality, easy and fast.

The article provides a series of code examples demonstrating how to convert a Markdown document to XPS using Aspose.HTML Cloud client SDKs and REST API. It covers various scenarios, including converting from a local file to a local file system and from cloud storage to cloud storage. SDKs are available in PHP, C++, Ruby, Python, C#, Java, Android, Swift, and Node.js. We will consider various scenarios of Markdown to XPS conversion.

SDK Examples of Markdown 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 Markdown 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 Markdown to XPS for different cases using available SDKs and cURL.

Example 1. Convert Markdown file to XPS with default save options

Markdown 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 Markdown to XPS with explicitly specified options

The example below demonstrates how to convert an Markdown 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 Markdown files are in the SDK Conversion Options section.

Example 3. Convert Markdown to XPS inside cloud storage

Aspose.HTML Cloud allows you to get an Markdown file from your cloud storage and save conversion result back to cloud storage. The conversion occurs with default conversion options.

See Also