Elestia Open Source Ratings
7.4

React-PDF viewer

A strong pick. 3rd of 9 PDF libraries.

React-PDF (wojtekmaj) is a thin, well-kept React wrapper around Mozilla's PDF.js that shows PDF pages as React components. It is the usual first choice for showing PDFs in a React app. It does not create or edit PDFs, and it has no ready-made viewer toolbar.

Best for: React 19 apps that need to show PDF pages, with text selection and links, inside their own UI.

WebsiteGitHubnpm

Scores

Overall7.4

How strongly do we recommend it for a new project today?

Claude Opus 5.5: 7.0, likely 6.0 to 8.0

For showing PDFs in a React app, it is the strongest free, maintained option and a clear pick. It does only that one part of the category's job, though. You still build the viewer UI yourself, and worker setup and frequent majors add friction. The score is for that named use, not for PDF work in general.

GPT-6.2 Sol: 7.8, likely 6.7 to 8.7

React-PDF is a strong pick for custom PDF viewing in a new React 19 app, with typed components and an active release cycle. PDF.js itself is the better fit for a ready-made viewer or framework-neutral integration. The recommendation depends on how much viewer UI the team needs to build and how well its largest documents render.

Needed by many3.9

How many developers need a tool for this job?

Claude Opus 5.5: 4.0, likely 3.0 to 5.0

It covers only the 'show' part of the category's job, and only for React apps. Showing PDFs inside an app is a clear but limited need: invoices, documents and contract viewers. That makes it narrower than generation libraries or PDF.js itself.

GPT-6.2 Sol: 3.7, likely 2.7 to 4.8

PDF viewing is a distinct need within the broader PDF category. React reached 41.5% of respondents to Stack Overflow’s 2026 web technology question, and this package serves the subset using React 19 who need an embedded PDF viewer. The survey leaves the size of that subset uncertain.

Helps a lot7.5

How well does it do the job for those who need it?

Claude Opus 5.5: 7.0, likely 6.0 to 8.0

It does its narrow job well. It renders pages faithfully through PDF.js, gives you text and annotation layers, ships types, and now works with Suspense and Error Boundaries. Its limits are real, though: there is no toolbar, search UI or annotation editing, and worker setup often breaks in Next.js and other bundlers. Free or paid full viewers do more out of the box.

GPT-6.2 Sol: 8.0, likely 6.9 to 9.0

Version 11.1.0 gives teams typed page and outline components, selectable text, annotation rendering, and React error boundaries. Versioned examples give developers and coding agents a clear starting point, though matching the worker and configuring assets still require care. Users report performance problems with long PDFs, and teams need to implement visible-page rendering and document-wide search. Independent measurements on 11.1.0 are sparse.

Holds up over time7.1

Will it still be a good choice in two years?

Claude Opus 5.5: 7.0, likely 6.0 to 8.0

The project is ten years old and still active: 184 commits and 6 releases in the last year, and it tracks PDF.js closely. It rests mostly on one maintainer, funded by sponsorship. Majors arrive about once a year and remove support for older platforms (ESM-only in v10, React 19 in v11), which forces upgrades.

  • github commitsLastYear: 184 commits and 6 releases in the last year
  • github openIssues: 5 open and 1,206 closed
  • github.com/wojtekmaj/react-pdf/releases: v10 is ESM-only; v11 requires React 19 and Node 22.13
  • wojtekmaj maintainer: Mostly a single maintainer

GPT-6.2 Sol: 7.2, likely 6.0 to 8.3

The project shipped six releases and made 184 commits over the past year, with a contributor’s October Vite fix shipped in November. Open Collective records sponsor support, and the release history centers on one maintainer. Version 11 changed loading behavior and dropped older React and browser support. A user report about the legacy worker shows the integration work these upgrades can create.

Used widely6.0

How many use it, and is that growing?

Claude Opus 5.5: 6.5, likely 5.5 to 7.5

It has 39.5M downloads in 4 weeks, up from 7.8M a year ago. That is a ratio of about 5.1, a bit above the 4.1 median, so it is slowly gaining ground. Its 7,693 dependent repositories are fewer than pdfmake's, PDFKit's or jsPDF's, but more than React-pdf renderer's. Some of the downloads come through 526 dependent packages rather than direct choices.

  • npm downloadsLast4Weeks: 39.5M now against 7.8M a year ago, a ratio of about 5.1
  • dependents: 7,693 repositories and 526 packages
  • github stars: 11.2k stars

GPT-6.2 Sol: 5.5, likely 4.4 to 6.7

Four-week installs grew 5.06× year over year, ahead of the catalog’s 4.1× baseline and behind seven of the eight PDF peers. The 7,693 indexed repositories and 526 npm dependents put it fifth of nine by repository count. Automated and transitive installs make the gain in direct adoption hard to estimate, and the collected social activity is sparse.

  • npm downloadsLast4Weeks, npm downloadsSame4WeeksYearAgo, medianDownloadsRatio: 39.5 million installs versus 7.8 million a year earlier.
  • dependents repos, dependents packages, peers: Fifth by indexed dependent repositories and eighth by download growth.
  • github stars, bluesky posts, hackerNews stories: 11,204 stars, one Bluesky link post, and zero matched Hacker News stories.
  • npmjs.com/package/react-doc-viewer?activeTab=dependencies: React Doc Viewer installs React-PDF transitively.
Vouched for5.8

Who stands behind it being good?

Claude Opus 5.5: 5.0, likely 4.0 to 6.5

Independent and vendor comparisons both name it as the standard basic React PDF viewer. However, there is no survey data and no named production users, and there are no Hacker News stories and almost no Bluesky posts. Most write-ups come from commercial vendors that use it as the baseline for their own products.

GPT-6.2 Sol: 6.6, likely 5.4 to 7.7

Papermark lists React-PDF 8, and Verint and KDAN name React-PDF in their product notices. React Doc Viewer also builds on it, and an independent review tested the v10 browser bundle. These sources establish real use, with limited public evidence about production adoption or developer satisfaction on v11.

Safe7.0

How safe is it to depend on?

Claude Opus 5.5: 7.0, likely 6.0 to 8.0

It has one advisory, a HIGH from 2024 that came from PDF.js and allowed script execution from a malicious PDF. It was fixed quickly, and later releases also sanitise text-renderer output. Releases now use OIDC trusted publishing, and the licence is MIT. The Scorecard is 5, with no code review, pinned dependencies or security policy. It pulls in the large pdfjs-dist, which handles untrusted input.

  • advisories: 1 HIGH from 2024 (PDF.js eval issue), none in the last 24 months
  • scorecard score: 5/10; Code-Review, Pinned-Dependencies and Security-Policy all 0
  • github.com/wojtekmaj/react-pdf/releases: Trusted publishing since v10.2; customTextRenderer output sanitised in v10.4.1 and v10.5
  • npm dependencies: 9 dependencies, including pdfjs-dist

GPT-6.2 Sol: 7.0, likely 5.9 to 8.1

React-PDF patched its high-severity 2024 advisory in two release lines on the day of disclosure. Version 11.1.0 pins PDF.js 6.5.438, which includes the fix for a separate 2026 upstream advisory. The MIT licence, npm trusted publishing, and immutable GitHub releases help. Nine direct dependencies and weak Scorecard checks for code review, branch protection, and pinned workflow dependencies leave room for supply-chain risk.

Good

  • A small, simple API: <Document>, <Page> and <Thumbnail> give you rendered pages with text and annotation layers in a few lines.
  • It is actively maintained and keeps up with PDF.js; v11.1.0 shipped in November 2026 with PDF.js 6.5.
  • It ships its own TypeScript types and is published with OIDC trusted publishing and immutable releases.
  • Issues are handled fast: 5 open issues against more than 1,200 closed.

Bad

  • It only displays PDFs; making, filling, annotating or signing them needs another library.
  • There is no viewer UI, so you build zoom, search and the toolbar yourself.
  • Setting up the PDF.js worker is a recurring pain point with bundlers and Next.js.
  • Major versions come often: v10 became ESM-only and v11 requires React 19 and turns Suspense on by default.

The numbers

npm downloads, 4 weeks
39M ×5.1 in a year
GitHub stars
11k
Commits, 12 months
184
npm version
11.1.0 Nov 2026
Versions, 12 months
6
Advisories, 24 months
0 of 1 ever
OpenSSF Scorecard
5.0 out of 10, Oct 2026
Licence
MIT

Read on 21 November 2026 from GitHub (wojtekmaj/react-pdf), npm (react-pdf), OSV and the OpenSSF Scorecard.

PDF libraries

  1. 8.7PDF.js
  2. 7.6PDFKit
  3. 7.4React-PDF viewer
  4. 7.4unpdf
  5. 7.3React-pdf renderer
  6. 7.2pdfmake
  7. 6.9pdfme
  8. 6.4jsPDF
  9. 4.9pdf-lib
Compare all 9 on six scores