PDFPipe

Node.js PDF generator API

Generate PDFs in Node.js with one fetch

Skip Puppeteer, html-pdf, and the Chromium binary. From Express, Fastify, NestJS, or bare Node 18+, a single fetch turns HTML into a PDF. JavaScript in, PDF out, nothing to install.

Express example

fetch is built into modern Node, so there is no client library to add. The same call works in Fastify, NestJS, Hono, and serverless handlers.

JavaScript
import express from "express";
const app = express();
app.use(express.json());

app.post("/invoice", async (req, res) => {
  const r = await fetch("https://api.pdfpipe.xyz/v1/pdf", {
    method: "POST",
    headers: {
      Authorization: `Bearer ${process.env.PDFPIPE_API_KEY}`,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({ html: req.body.html, options: { format: "A4" } }),
  });
  res.set("Content-Type", "application/pdf");
  res.send(Buffer.from(await r.arrayBuffer()));
});

Why a Node PDF generator API

No native deps

No Chromium, no wkhtmltopdf binary, no postinstall steps to break your CI.

Small containers

Drop 200 MB of browser dependencies from your image and keep deploys fast.

Reliable under load

No browser process to leak or crash inside your Node service.

Works across the Node ecosystem

  • Express, Fastify, NestJS, Hono, Koa, and bare http.
  • TypeScript-friendly, with an optional Node SDK.
  • Generate from an HTML string, a URL, or a template plus data.
  • Batch endpoint and webhooks for high-volume JavaScript jobs.

Frequently asked

How do I generate a PDF in Node.js?

POST your HTML to /v1/pdf with a bearer token using the built-in fetch. The response body is the PDF. No Puppeteer or Chromium binary required.

Can I generate a PDF in JavaScript without Puppeteer?

Yes. A render API does the browser work remotely, so your JavaScript only makes an HTTP request and receives the finished PDF.

Does it work with Express and Fastify?

Yes. Any Node framework can call the endpoint. The example shows Express, and Fastify, NestJS, and Hono are identical in spirit.

Is there a Node SDK?

Yes, an official Node SDK is available, though a plain fetch works just as well.

Related guides and APIs

These pages cover related search intents. Pick the one that matches what you are building.

500 free documents a month, flat pricing after that, and a live playground you can try without signing up.