HTML Render
Render HTML content to PDF, JPG or PNG
Request
- Base URLhttps://neutrinoapi.net
- AuthAPI key in header user-id and API key in header api-key
Request body application/x-www-form-urlencoded
The HTML content. This can be either a URL to load from, a file upload (multipart/form-data) or an HTML content string
Which format to output, available options are: PDF, PNG, JPG
Set the document page size, can be one of: A0 - A9, B0 - B10, Comm10E, DLE or Letter
The document title
The document margin (in mm)
The document left margin (in mm)
The document right margin (in mm)
The document top margin (in mm)
The document bottom margin (in mm)
Set the document to landscape orientation
Set the zoom factor when rendering the page (2.0 for double size, 0.5 for half size)
Render the final document in grayscale
Inject custom CSS into the HTML. e.g. 'body { background-color: red;}'
If rendering to an image format (PNG or JPG) use this image width (in pixels)
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
Number of seconds to wait before rendering the page (can be useful for pages with animations etc)
Set the PDF page width explicitly (in mm)
Set the PDF page height explicitly (in mm)
Timeout in seconds. Give up if still trying to load the HTML content after this number of seconds
Ignore any TLS/SSL certificate errors
The header HTML to insert into each page. The following dynamic tags are supported: {date}, {title}, {url}, {pageNumber}, {totalPages}
The footer HTML to insert into each page. The following dynamic tags are supported: {date}, {title}, {url}, {pageNumber}, {totalPages}
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
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: <br> <div> sleep(seconds); Just wait/sleep for the specified number of seconds. <br> click('selector'); Click on the first element matching the given selector. <br> focus('selector'); Focus on the first element matching the given selector. <br> keys('characters'); Send the specified keyboard characters. Use click() or focus() first to send keys to a specific element. <br> enter(); Send the Enter key. <br> tab(); Send the Tab key. <br> </div>
Override the browsers default user-agent string with this one
Response
OK
Changes
No recorded changes to this operation across all 4 revisions of this API.