All features
Every capability of React PDF Viewer, grouped by what it does, each with its own page and live demos.
React PDF Viewer covers what an application needs to show PDF documents well: loading from any source, reading comfortably on any screen size, finding and selecting text, printing and downloading, and fitting into your app’s state, design and accessibility requirements. Everything below is free and open source. Features beyond the classic single-page viewer are opt-in: each is one prop, and turning it on never changes other behavior.
The viewer deliberately does not edit, annotate, sign or fill in documents, and it does not convert other formats to PDF. For needs outside its scope, the headless building blocks and the underlying PDF.js document are available.
Core features
Document sources
Open PDFs from a URL, a File the user picked, or bytes you already have, without uploading anything.
Page navigation
Move between pages with the toolbar, the keyboard or your own controls, and keep the current page in sync with your app.
Zoom
Zoom in steps or through presets, with the toolbar, the keyboard or Ctrl/⌘ + wheel, between limits you choose.
Rotation
Rotate pages in quarter turns, on top of the orientation each page already declares.
Download
Save the open document under a sensible file name without requesting it again, or take over the download yourself.
Print
Print the document at 150 DPI with progress and a cancel button, or hand printing to the browser's own PDF viewer.
Error states
Show a clear message with Retry when a document can't load or render, and receive a typed error for your own handling.
Display & layout
Toolbar
Place the toolbar above or below the page, choose its actions, and let it collapse into a “More actions” menu on narrow screens.
Fit modes
Size pages to the available width, to the whole page, or to their true size, and switch to true size as soon as users zoom.
Fullscreen
Show the document fullscreen with the browser's Fullscreen API, an in-page overlay, or inside your own dialog.
Continuous layout
Scroll through every page in one column, rendering only the pages near the screen so long documents stay fast.
Thumbnails
Add a sidebar of page previews that shows where you are and jumps to any page.
Loading states
Show a loading view while a document downloads and an empty state when there is nothing to show, or replace both with your own.
Interaction
Keyboard shortcuts
Navigate, zoom, rotate and go fullscreen from the keyboard while focus is in the viewer, without stealing keys from the rest of your app.
Page number input
Let users type the page they want in the toolbar instead of clicking through a long document.
Links
Make links inside documents work, jumping to pages within the document or opening websites safely in a new tab.
Content & data
Text layer
Overlay real, selectable text on each page so users can copy it and screen readers can read the document.
Search
Find text across the whole document, highlight every match, and step through results from the keyboard.
Password protection
Open encrypted documents with a password your app provides, or ask the user for it with a built-in or custom form.
Labels and locale
Translate or reword every visible text and accessible name, and format numbers for any locale.
Connectivity
PDF.js configuration
Self-host the PDF.js worker, fonts and decoders for production, choose a build for older browsers, and tune PDF.js per viewer.
Authenticated requests
Load protected PDFs with cookies, headers or your own HTTP client, and handle expired sessions and HTTP errors your way.
Developer tools
Controlled state
Own the page, zoom, rotation and fullscreen state in your app, or let the viewer keep it, with one consistent pattern.
Imperative API
Command the viewer from your own buttons and code through a ref, and read its current page, zoom and status.
Events
React to the document loading, pages rendering and the user navigating, for analytics, logging or your own UI.
Custom toolbar
Replace the toolbar with your own controls, or combine parts of the built-in toolbar with buttons of your own.