Welcome to the API documentation. Below, you'll find details on how to use the `/htmltopdf` endpoint.
/htmltopdfThe `/htmltopdf` endpoint requires a JSON body with the following structure:
{
"pages": "base64_encode(<html><body>...</body></html>)",
"globalOptions": "global options string"
}
{
"pages": [
{
"page": "base64_encode(html content)",
"pageOptions": "page specific options"
},
{
"page": "base64_encode(url string)",
"pageOptions": "page specific options"
}
],
"globalOptions": "global options string"
}
If you want to directly display the PDF in a browser, you can use an iframe with the following format:
<iframe src="data:application/pdf;base64,{content received from response}"></iframe>