Media and documents · Library

react-pdf

A React component library for showing existing PDF files inside a web page, page by page, with text that can be selected and links that work.

PDFs · Open source · updated

How it works

react-pdf wraps Mozilla's PDF.js, the engine behind Firefox's built-in PDF viewer. A Document component loads a file from a URL or from data, and Page components render each page to a canvas, with optional text and annotation layers so text can be selected and links clicked. The PDF.js worker has to be configured so that parsing runs off the main thread.

It displays PDFs; it does not create them, and its similar name often causes confusion with @react-pdf/renderer, which generates PDFs from React components. Toolbars, search, zoom and thumbnails are yours to build, or you can use PDF.js's own viewer or a commercial viewer SDK. For long files, rendering only the pages on screen keeps memory use down.

react-pdf pricing

Open source

Free (MIT).

Approximate, checked September 2026.What the other tools cost

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.