Convert HTML content to downloadable PDF documents with a single POST request. Invoices, reports, contracts — generate PDFs from any HTML.
| Param | Required | Description |
|---|---|---|
html | Required | HTML content to convert to PDF |
title | Optional | PDF document title (default: "Document") |
curl -X POST "https://api-snap.com/api/pdf" \
-H "Authorization: Bearer snp_your_key" \
-H "Content-Type: application/json" \
-d '{"html": "<h1>Invoice #1234</h1><p>Total: $99.00</p>", "title": "Invoice"}' \
-o invoice.pdfconst res = await fetch("https://api-snap.com/api/pdf", {
method: "POST",
headers: {
Authorization: "Bearer snp_your_key",
"Content-Type": "application/json",
},
body: JSON.stringify({
html: "<h1>Report</h1><table>...</table>",
title: "Monthly Report",
}),
});
const blob = await res.blob();import requests
r = requests.post(
"https://api-snap.com/api/pdf",
json={"html": "<h1>Contract</h1><p>Terms...</p>", "title": "Contract"},
headers={"Authorization": "Bearer snp_your_key"},
)
with open("contract.pdf", "wb") as f:
f.write(r.content)Generate PDF invoices from HTML templates with dynamic data
Convert dashboard data and charts into downloadable PDF reports
Create PDF contracts from HTML forms for e-signature workflows
Generate personalized certificates and diplomas as PDF downloads
HTML in, PDF out. One API call, zero headless browser setup.
Get Your Free API Key