PDFPipe

Comparison

A server-side alternative to pdfmake

pdfmake generates PDFs from a JSON document definition object: you describe the layout as a JavaScript data structure with columns, tables, stacks, and style objects. It does not render HTML. Every template is a separate data model you have to keep in sync with your actual UI. PDFPipe renders your HTML and CSS directly, the same way a browser does, from a single POST request.

pdfmake versus a dedicated PDF API

PDFPipepdfmake
Template formatHTML + CSS you already haveJSON document definition object
Renders HTMLYes, full browser engineNo (proprietary definition format)
CSS supportCompleteNone (own style system)
Web fontsLoaded automaticallyMust download and register manually
Complex tablesCSS Grid / table layoutLimited column system
Runs onYour server (one HTTP call)Node.js or browser
Designer workflowDesign in HTML, ship as PDFTranslate design to JSON objects
AI agentsFirst-class MCP serverNot applicable

The JSON definition problem

pdfmake has its own layout language expressed as JavaScript objects: columns are arrays, tables are objects with body arrays, styles are separate dictionaries. This works well for simple documents, but breaks down when the layout is complex: responsive behavior is impossible, CSS flexbox and grid are unavailable, and any designer-led change in your UI has to be manually re-expressed in the pdfmake schema. Two sources of truth diverge over time. PDFPipe has one source of truth: your HTML.

Fonts, images, and real-world layouts

pdfmake requires you to download font files and register them in a virtual filesystem object. Every web font your designers chose needs to be fetched, encoded, and embedded manually. Images need to be either embedded as base64 or loaded from a URL at render time. Complex layouts involving overlapping elements, sticky headers, or multi-column text are simply not achievable. PDFPipe renders exactly what a browser would, including web fonts loaded from CDNs, CSS variables, and modern layout primitives.

From HTML to PDF in one request

// Your existing HTML template — no JSON schema to maintain
const html = renderInvoiceTemplate(order);

const res = await fetch("https://api.pdfpipe.xyz/v1/pdf", {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.PDFPIPE_API_KEY}` },
  body: JSON.stringify({ html, options: { format: "A4" } }),
});
const pdf = await res.arrayBuffer();

When to keep pdfmake

pdfmake is a reasonable choice when you need to generate a simple structured document entirely in the browser without any server dependency, and the layout is simple enough that the JSON schema stays manageable. For server-side generation, HTML templates, or complex layouts, a dedicated render API produces better output with far less code and maintenance.

Try it on the live playground with no signup.

See pricing →