HTML to Image Conversion

Introduction

Aspose.HTML Cloud has provided an API to convert HTML page to the raster image format (JPEG, PNG, BMP or TIFF). You can convert the HTML document either from the storage by its name or from the web by its URL to the specified image format.

The outFormat parameter value could be one of the following:

  • jpeg
  • bmp
  • png
  • tiff

API Information

APITypeDescriptionSwagger Link
/html/{name}/convert/image/{outFormat}GETConverts the HTML document (located on storage) to the specified image format and returns resulting file in response contentGetConvertDocumentToImage
/html/{name}/convert/image/{outFormat}PUTConverts the HTML document (located on storage) to the specified image format and uploads resulting file to storage.PutConvertDocumentToImage
/html/convert/image/{outFormat}GETConverts the HTML page (located in the Web) to the specified image format and returns resulting file in response contentGetConvertDocumentToImageByUrl
/html/convert/image/{outFormat}POSTConverts the HTML document (in request content) to the specified image format and uploads resulting file to storagePostConvertDocumentInRequestToImage

cURL Example

Case 1: Converts the HTML document (located on storage) to the specified image format and returns resulting file in response content: