HTML to PDF
Convert a URL or HTML string to a PDF document.
TL;DR: Render any URL or HTML as a print-ready PDF via headless Chrome.
Endpoint: POST /api/v1/pdf
Overview
Generate PDFs from URLs or HTML snippets with accurate CSS and JavaScript rendering.
Formats
Supports A4, Letter, and custom dimensions with headers and footers.
Code examples
Node.js
await fetch("https://useforgekit.dev/api/v1/pdf", {
method: "POST",
headers: { Authorization: "Bearer fk_live_...", "Content-Type": "application/json" },
body: JSON.stringify({ url: "https://example.com", format: "A4" }),
});Python
requests.post("https://useforgekit.dev/api/v1/pdf",
headers={"Authorization": "Bearer fk_live_..."},
json={"url": "https://example.com"})cURL
curl -X POST https://useforgekit.dev/api/v1/pdf -H "Authorization: Bearer fk_live_..." -d '{"url":"https://example.com"}'Pricing
250 free credits/month. Paid plans from $19/mo. View pricing.
FAQ
Does it support JavaScript?
Yes — full Chrome rendering engine.
Credits per PDF?
2.5 credits per conversion.