Stack · Node.js
Generate PDFs in Node.js
Running Puppeteer in Node means installing Chromium, sandboxing untrusted HTML, and babysitting a browser pool that leaks memory under load.
Offload all of that. Call the API with the official TypeScript SDK (or plain fetch) and get the PDF bytes back.
01Call it from Node.js
render.ts
import { RenderClient } from "@rendral/sdk";
const client = new RenderClient(process.env.PDF_API_KEY!);
const pdf = await client.pdf({
html: "<h1>Invoice</h1>",
options: { pageNumbers: true, format: "A4" },
});
await writeFile("invoice.pdf", pdf);Frequently asked
Why not run Puppeteer myself?
You can — but you then own the Chromium install, the sandboxing of untrusted HTML, the browser pool, and its memory leaks. The API handles all of it.
Is the SDK typed?
Yes — the official @rendral/sdk package ships TypeScript types for every method and option.
Can I still use plain fetch?
Absolutely — the SDK is a thin wrapper; a single fetch POST works too.
Start rendering in minutes.
A free tier, five endpoints, and SDKs for Node and Python.