Media and documents · Library

@react-pdf/renderer

A library for generating PDF documents with React components, so invoices, reports and tickets are designed much like web pages and saved as real PDFs.

PDFs · Open source · updated

How it works

Instead of HTML elements you use its own building blocks, such as Document, Page, View, Text, Image and Link, styled with a subset of CSS and laid out with flexbox through the Yoga layout engine. Text wraps and flows across pages on its own, headers and footers repeat with the fixed prop, and page numbers come from a render function. Custom fonts are registered once, and SVG drawing is supported.

It runs in the browser, with a preview component and download links, and in Node, where renderToFile, renderToStream or renderToBuffer build files on a server. It does not render HTML or Tailwind classes, so existing web components cannot be reused directly, and very large documents take a while to build. When a PDF must match an existing web page exactly, a headless browser such as Puppeteer is the usual alternative.

@react-pdf/renderer pricing

Open source

Free (MIT).

Approximate, checked September 2026.What the other tools cost

@react-pdf/renderer vs the alternatives

More in Media and documents

PDFs

All 14 Media and documents terms

Crafted in the dark. Shipped to the world.

Tell us what you are building. You get a private project space with a proposal and a line-by-line quote within a day.