Data Sources
HTML to PDF
Convert raw HTML strings into high-quality PDF documents. This is the most robust and flexible method for generating dynamic invoices, receipts, or complex reports.
Implementation Example
{
// Your raw HTML string
"html": "<!DOCTYPE html><html><body><h1>Invoice #123</h1><p>Thank you!</p></body></html>",
// Optional: Force a specific filename when downloaded
"filename": "invoice_123.pdf"
}
Parameters Explained
html
Required
A string containing the HTML content you want to convert. This can be a complete HTML document including
<head> and inline CSS, or a simple partial string.
filename
Custom name for the generated PDF. If not provided, a random unique string will be used. Do not include the
.pdf extension (it is added automatically).