PDFPipe

Comparison

A server-side alternative to html2pdf.js

html2pdf.js works by running html2canvas in the browser to take a screenshot of the DOM, then embedding that screenshot as a raster image inside a PDF. The result is blurry at non-screen DPI, text is not selectable or searchable, file sizes are large, and the quality degrades when the page has responsive breakpoints or complex layout. PDFPipe renders your HTML with a real browser engine and produces a true vector PDF from the server.

html2pdf.js versus a dedicated PDF API

PDFPipehtml2pdf.js
Rendering methodNative PDF from browser engineCanvas screenshot embedded as image
Text in outputVector, selectable, searchableRasterized image, not selectable
Print qualityCrisp at any DPI, print-readyBlurry above screen resolution
File sizeSmall (vector text, compact)Large (PNG/JPEG embedded per page)
CSS supportComplete, including print rulesLimited by canvas capture
Runs onServer (one API call)User's browser
Page breaksHonored via CSS print rulesManual or unreliable
AI agentsFirst-class MCP serverNot applicable

The screenshot-to-PDF problem

html2canvas captures the visible DOM at screen resolution (72-96 DPI). When that image is embedded in a PDF and the recipient prints it at 300 DPI or zooms in, text and fine details become pixelated. Invoices and contracts printed this way look unprofessional. PDFPipe generates a real PDF with vector text: every character is crisp regardless of zoom level or print DPI, and the file is 5-10x smaller.

Text selection and accessibility

An html2canvas-based PDF contains images, not text. The reader cannot select an order number, copy an email address, or use Ctrl-F to search the document. Screen readers cannot read it. PDFs generated by PDFPipe contain real selectable text, pass PDF/A accessibility checks, and work correctly in every PDF viewer.

One request, real output

// Server-side: your HTML template becomes a real PDF
const html = renderOrderConfirmation(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" } }),
});
// res.body is a vector PDF: text selectable, print-ready, small file.
const pdf = await res.arrayBuffer();

When to keep html2pdf.js

html2pdf.js is useful when you genuinely need to capture an exact visual snapshot of a page as it appears in a specific browser: preserving a dashboard screenshot, capturing a user-edited diagram, or archiving a rendered visualization. For anything that will be printed, shared as a document, or needs selectable text, a server-side render API produces far better results.

Try it on the live playground with no signup.

See pricing →