DocuHook
Webhook to PDF.
Merge JSON payloads into HTML templates. Preview live, download a PDF — no account. Stateless API that accepts bursts without dropping connections.
Live sandbox
Edit either pane. Tokens like {{customer.name}} pull from your JSON.
WordPress plugin
Lightweight connector for the DocuHook API. Install from zip, add your API key under Settings → DocuHook.
Stateless API
Register for an API key. Send data + html with your Bearer token. Sync for interactive calls, async for webhook bursts.
POST /api/v1/render
Authorization: Bearer dh_...
Content-Type: application/json
{
"mode": "sync",
"data": { "invoice": { "number": "INV-1" } },
"html": "<h1>{{invoice.number}}</h1>"
}
# Returns application/pdf by default. Use "format": "html" for merge-only.
# Bursts / webhooks (returns 202 job):
POST /api/v1/hooks/render
Authorization: Bearer dh_...
Guides
Copy-paste recipes for HTML→PDF in Next.js, WooCommerce, and serverless Puppeteer.
- How to Generate PDF from HTML in Next.js Copy-pasteable guide: merge JSON into an HTML invoice in a Next.js route, then download a PDF — without Puppeteer on your server.
- Convert a WooCommerce Webhook to a PDF Invoice Turn WooCommerce order.completed webhooks into PDF-ready invoices with a WordPress plugin and a 3-line DocuHook call.
- Puppeteer Serverless HTML to PDF Timeout Fix Why Chrome-on-Lambda times out, and how to replace the merge step with a ~200ms API call so your serverless function stays under the limit.