Fundamentals
Multicloud / Geofence
API Examples
API Specification
SDKs / Codegen
Batch Processing
Best Practice
Error Codes
Parameter | Required | Type | Default | Description |
---|---|---|---|---|
content | yes | string | The HTML content. This can be either a URL to load from, a file upload (multipart/form-data) or an HTML content string | |
format | no | string | Which format to output, available options are: PDF, PNG, JPG | |
title | no | string | The document title | |
page-size | no | string | A4 | Set the document page size, can be one of: A0 - A9, B0 - B10, Comm10E, DLE or Letter |
page-width | no | float | Set the PDF page width explicitly (in mm) | |
page-height | no | float | Set the PDF page height explicitly (in mm) | |
image-width | no | integer | 1024 | If rendering to an image format (PNG or JPG) use this image width (in pixels) |
image-height | no | integer | If rendering to an image format (PNG or JPG) use this image height (in pixels). The default is automatic which dynamically sets the image height based on the content | |
margin | no | float | 0 | The document margin (in mm) |
margin-left | no | float | 0 | The document left margin (in mm) |
margin-right | no | float | 0 | The document right margin (in mm) |
margin-top | no | float | 0 | The document top margin (in mm) |
margin-bottom | no | float | 0 | The document bottom margin (in mm) |
landscape | no | boolean | false | Set the document to landscape orientation |
zoom | no | float | 1 | Set the zoom factor when rendering the page (2.0 for double size, 0.5 for half size) |
grayscale | no | boolean | false | Render the final document in grayscale |
css | no | string | Inject custom CSS into the HTML. e.g. 'body { background-color: red;}' | |
bg-color | no | string | For image rendering set the background color in hexadecimal notation (e.g. #0000ff). For PNG output the special value of 'transparent' can be used to create a transparent PNG | |
timeout | no | integer | 300 | Timeout in seconds. Give up if still trying to load the HTML content after this number of seconds |
delay | no | integer | 0 | Number of seconds to wait before rendering the page (can be useful for pages with animations etc) |
ignore-certificate-errors | no | boolean | false | Ignore any TLS/SSL certificate errors |
header | no | string | The header HTML to insert into each page. The following dynamic tags are supported: {date}, {title}, {url}, {pageNumber}, {totalPages} | |
footer | no | string | The footer HTML to insert into each page. The following dynamic tags are supported: {date}, {title}, {url}, {pageNumber}, {totalPages} | |
exec | no | string | Execute JavaScript on the website. This parameter accepts JavaScript as either a string containing JavaScript or for sending multiple separate statements a JSON array or POST array can also be used. You can also use the following specially defined user interaction functions: sleep(seconds); Just wait/sleep for the specified number of seconds. click('selector'); Click on the first element matching the given selector. focus('selector'); Focus on the first element matching the given selector. keys('characters'); Send the specified keyboard characters. Use click() or focus() first to send keys to a specific element. enter(); Send the Enter key. tab(); Send the Tab key. | |
user-agent | no | string | Override the browsers default user-agent string with this one |
Characteristic | Value | Description |
---|---|---|
Avg Latency | 1-10s (variable) | This API has a non-deterministic latency based on outside factors |
Max Rate | 6/second | Maximum inbound request rate. Exceeding this will result in request throttling |
Max Concurrency | 25 | Maximum concurrent/simultaneous requests. Exceeding this will result in error code 06 [TOO MANY CONNECTIONS] |