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

API Type Description Swagger Link
/html/{name}/convert/image/{outFormat} GET Converts the HTML document (located on storage) to the specified image format and returns resulting file in response content GetConvertDocumentToImage
/html/{name}/convert/image/{outFormat} PUT Converts the HTML document (located on storage) to the specified image format and uploads resulting file to storage. PutConvertDocumentToImage
/html/convert/image/{outFormat} GET Converts the HTML page (located in the Web) to the specified image format and returns resulting file in response content GetConvertDocumentToImageByUrl
/html/convert/image/{outFormat} POST Converts the HTML document (in request content) to the specified image format and uploads resulting file to storage PostConvertDocumentInRequestToImage

cURL Example

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