Convert from HTML Content – Aspose.HTML Cloud

This guide shows how to convert HTML content directly from a string using the Aspose.HTML Cloud API. The provided example illustrates converting HTML content to PDF, but similar methods apply for converting into various formats supported by the API:

Before you begin, make sure you have an authorization token. Check out the Authorization Guide to learn more.

Conversion Methods from HTML Content

Aspose.HTML Cloud supports synchronous conversion from HTML content:


Synchronous HTML Content to PDF Conversion

Endpoint: POST https://api.aspose.cloud/v4.0/html/conversion/html-pdf/sync

Authorization: Bearer token

Request Body:

1{
2    "InputContent": "<html><body><h1>Hello World</h1></body></html>"
3}

Response: PDF file returned directly as a binary stream.

See Also