Converts HTML content to PDF (or image) using wkhtmltopdf.
/panel/api/pdf/generateAccepts a JSON body. The html field must be base64-encoded.
{
"html": "base64_encode(<html><body>...</body></html>)",
"globalOptions": {}
}
no-outline, all margins 0, disable-smart-shrinking.
{
"success": true,
"data": "base64_encoded_pdf_bytes",
"message": "Generated successfully"
}
<iframe src="data:application/pdf;base64,{data}"></iframe>
data is properly base64-decoded before embedding.