HTM to JPG API

The API for converting HTML files to JPG images.

API Request:

Copy parameter's URL Secret Secret
Optional

String Authentication secret must be provided as a query parameter. If omitted, token must be provided.

Show all

Copy parameter's URL Token Token
Optional

String Authentication token must be provided as a query parameter. If omitted, secret must be provided.

Show all

Copy parameter's URL File File
Required

File File to be converted. Value can be URL or file content.

Show all

Copy parameter's URL StoreFile Store file
Optional

Bool Store converted file on our secure server and provides download URL.

Default: False

Show all

Copy parameter's URL FileName File name
Optional

String Converted output file name without extension. The extension will be added automatically.

Show all

Copy parameter's URL Timeout Timeout
Optional

Integer Conversion timeout in seconds.

Default: 120

Range: 10 .. 1200

Show all

Copy parameter's URL Async Asynchronous
Optional

Bool Run conversion job asynchronously.

Default: False

Show all

Copy parameter's URL JobId Job ID
Optional

String Conversion job self generated UUID (RFC 4122) used for getting conversion result asynchronously.

Show all

Copy parameter's URL WebHook WebHook
Optional

String Set WebHook URL to call after asynchronous conversion is finished. Async parameter must be enabled.

Show all

Copy parameter's URL AuthUsername Authentication username
Optional

String HTTP authentication username. Could be used if conversion web page is protected with HTTP authentication.

Show all

Copy parameter's URL AuthPassword Authentication password
Optional

String HTTP authentication password. Could be used if conversion web page is protected with HTTP authentication.

Show all

Copy parameter's URL ConversionDelay Conversion delay
Optional

Integer Delay in seconds before page load and PDF creation. Sometimes useful to let web page fully load.

Default: 0

Range: 0 .. 30

Show all

Copy parameter's URL AdBlock Ad block
Optional

Bool Block ads in converting page.

Default: False

Show all

Copy parameter's URL CookieConsentBlock Remove cookie warnings
Optional

Bool Tries to remove EU regulation required cookie warnings from web pages.

Default: False

Show all

Copy parameter's URL JavaScript Enable JavaScript
Optional

Bool Allow web pages to run JavaScript.

Default: True

Show all

Copy parameter's URL WaitElement Wait for DOM element
Optional

String Element selector string of the DOM element. Converter will wait for this element to appear in DOM before conversion begins.

Show all

Copy parameter's URL UserJs Execute JavaScript
Optional

String Execute provided JavaScript before conversion begins.

Show all

Copy parameter's URL HideElements Hide DOM elements
Optional

String Element selector string of the DOM elements that needs to be hidden during conversion.

Show all

Copy parameter's URL CssMediaType CSS media type
Optional

String Use CSS media type in conversion process. The default screen and print media types are supported but not limited to these. The custom media type, like convertapi can be used too.

Default: screen

Show all

Copy parameter's URL CropElement Crop DOM element
Optional

String Element selector string of the DOM element that should be converted. Element will be cropped from the document.

Show all

Copy parameter's URL Zoom Zoom
Optional

Double Set the default zoom level of webpages.

Default: 1

Range: 0.1 .. 10.0

Show all

Copy parameter's URL ImageWidth Image width
Optional

Integer Image width in pixels.

Range: 10 .. 20000

Show all

Copy parameter's URL ImageHeight Image height
Optional

Integer Image height in pixels.

Range: 10 .. 20000

Show all

Copy parameter's URL CropX Crop X offset
Optional

Integer Screenshot crop X offset.

Range: 0 .. 16384

Show all

Copy parameter's URL CropY Crop Y offset
Optional

Integer Screenshot crop Y offset.

Range: 0 .. 16384

Show all

Copy parameter's URL CropWidth Crop width
Optional

Integer Screenshot crop width.

Range: 1 .. 16384

Show all

Copy parameter's URL CropHeight Crop height
Optional

Integer Screenshot crop height.

Range: 1 .. 16384

Show all

Copy parameter's URL ImageQuality Output image quality
Optional

Integer Set output image quality.

Default: 75

Range: 10 .. 100

Show all

Developer mode

Snippets are autogenerated according to converter parameter choices above. Please select file in "File" or "Files" parameter before using code snippets.

Code snippet is using ConvertAPI JavaScript Client

Code snippet is using ConvertAPI Node.js Client

Code snippet is using ConvertAPI PHP Client

Code snippet is using ConvertAPI Java Client

Code snippet is using ConvertAPI C# Client

Code snippet is using ConvertAPI Ruby Client

Code snippet is using ConvertAPI Python Client

Code snippet is using ConvertAPI Go Client

Code snippet is using command line utility program

For conversions with the multiple file result please refer to the example