PDFPipe

Comparison

A server-side alternative to PDFKit

PDFKit is a Node.js library that builds PDFs by issuing draw commands: place text at coordinates, draw rectangles, embed images. It does not render HTML. If your source is an HTML template, PDFKit means manually translating CSS into positional drawing calls, re-implementing every font and layout rule, and updating that code every time the template changes. PDFPipe takes your HTML directly and renders it with a real browser engine.

PDFKit versus a dedicated PDF API

PDFPipePDFKit
Renders HTMLYes, full browser engineNo (programmatic drawing only)
CSS supportComplete (Flexbox, Grid, variables)None
Web fontsLoaded and rendered automaticallyMust embed manually
Image handlingResolved by the browser engineMust load and position manually
Runs onYour server (one HTTP call)Node.js process you maintain
Template changesUpdate your HTML/CSSRecalculate every coordinate
DependenciesZero (one HTTP call)npm package + font files
AI agentsFirst-class MCP serverNot applicable

The coordinate-math problem

PDFKit works by drawing primitives onto a page: doc.text("Invoice #4012", 72, 100). Every value is a pixel coordinate. When the content changes length, the coordinates below it need updating too. Tables, nested layouts, and responsive content that wraps at different widths all require manual calculation. A two-column invoice with a logo, an itemized table, and a footer becomes hundreds of lines of drawing code that breaks every time design changes. PDFPipe renders the same layout from a plain HTML file.

Fonts, images, and web standards

PDFKit requires you to register each font file explicitly and reference it by path. Web fonts loaded from a CDN must be downloaded and embedded manually. Images must be loaded, sized, and placed at exact coordinates. CSS features like Flexbox, CSS Grid, custom properties, and media queries are simply not available. PDFPipe renders the same HTML your designers work with, loads fonts and images exactly as a browser would, and supports every CSS property a modern browser supports.

From HTML to PDF in one request

// Your HTML template, rendered server-side — no coordinate math
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 PDFKit

PDFKit is the right tool when you need to generate a PDF entirely from data with no visual template: programmatic certificates, binary-encoded reports, or output that must conform to a precise positional spec. For any document that starts from an HTML or design file, PDFPipe produces better output in far less code.

Try it on the live playground with no signup.

See pricing →