React PDF Viewer
react-pdf-viewer.dev
A React component to view PDF documents - React PDF Viewer
React PDF Viewer · Docs · Plugins · Localizations · Examples · UpdatesPurchase · You can drag and drop a PDF document to the demo area below · // Core viewer · import { Viewer } from '@react-pdf-viewer/core'; // Plugins · import { ...
Examples
React PDF Viewer · Docs · Plugins · Localizations · Examples · UpdatesPurchase · The sample codes for examples and plugins can be found on this GitHub repo · Compile and set the worker source with Webpack · How to solve the "SyntaxError: Unexpected token" issue ·
Basic usage
However, if you use the Webpack ... and the `pdfjs-dist` package can be automated. There are two ways to archive that: ... If you use the viewer component in different pages, it's recommended to place the `Worker` at the layout level. For example, in a typical React application, ...
GitHub
github.com › react-pdf-viewer › react-pdf-viewer
GitHub - react-pdf-viewer/react-pdf-viewer: A React component to view a PDF document
A React component to view a PDF document. It's written in TypeScript, and powered by React hooks completely. // Core viewer import { Viewer } from '@react-pdf-viewer/core'; // Plugins import { defaultLayoutPlugin } from '@react-pdf-viewer/default-layout'; // Import styles import '@react-pdf-viewer/core/lib/styles/index.css'; import '@react-pdf-viewer/default-layout/lib/styles/index.css'; // Create new plugin instance const defaultLayoutPluginInstance = defaultLayoutPlugin(); <Viewer fileUrl='/assets/pdf-open-parameters.pdf' plugins={[ // Register plugins defaultLayoutPluginInstance, ...
Starred by 2.6K users
Forked by 295 users
Languages TypeScript 97.5% | CSS 2.5%
Videos
09:06
How to View Pdf in React using React PDF || React PDF Viewer || ...
13:10
How to View PDFs in React JS with React PDF Viewer - YouTube
13:23
How to display PDF Files using React PDF Viewer in 2022 - YouTube
07:26
Create Custom PDF Viewer using React PDF & React Hooks - YouTube
11:12
ReactPDF Basic Setup - YouTube
07:06
Incorporating PDF Viewing and Editing into a React App using ...
React-pdf
react-pdf.org
React-pdf
React renderer for creating PDF files on the browser and server
npm
npmjs.com › package › react-pdf
react-pdf - npm
Latest version: 10.2.0, last published: 2 months ago. Start using react-pdf in your project by running `npm i react-pdf`. There are 985 other projects in the npm registry using react-pdf.
» npm install react-pdf
Published Oct 09, 2025
Version 10.2.0
Author Wojciech Maj
Repository https://github.com/wojtekmaj/react-pdf
CodeSandbox
codesandbox.io › examples › package › @react-pdf-viewer › core
@react-pdf-viewer/core examples - CodeSandbox
Use this online @react-pdf-viewer/core playground to view and fork @react-pdf-viewer/core example apps and templates on CodeSandbox.
GitHub
github.com › wojtekmaj › react-pdf
GitHub - wojtekmaj/react-pdf: Display PDFs in your React app as easily as if they were images.
Starred by 10.7K users
Forked by 981 users
Languages TypeScript 94.3% | CSS 5.6% | HTML 0.1%
GitHub
github.com › react-pdf-viewer › examples
GitHub - react-pdf-viewer/examples: React PDF viewer examples
Starred by 59 users
Forked by 35 users
Languages TypeScript
Syncfusion
ej2.syncfusion.com › react › documentation › pdfviewer › getting-started
Getting started with Standalone React PDF Viewer component| Syncfusion
If you’re using TypeScript (TSX), add it in src/index.tsx to render the PDF Viewer component. ... import * as ReactDOM from 'react-dom/client'; import * as React from 'react'; import './index.css'; import { PdfViewerComponent, Toolbar, Magnification, Navigation, LinkAnnotation, BookmarkView, ThumbnailView, Print, TextSelection, Annotation, TextSearch, FormFields, FormDesigner, Inject} from '@syncfusion/ej2-react-pdfviewer'; function App() { return (<div> <div className='control-section'> {/* Render the PDF Viewer */} <PdfViewerComponent id="container" documentPath="https://cdn.syncfusion.com
CodeSandbox
codesandbox.io › examples › package › react-pdf
react-pdf examples - CodeSandbox
reactReact example starter project · pdf-viwer · pdf-reader · pdf-view · coolenginner/pdf-edit-react · pdf-sign · react-doc-viewerDocument viewer for react. Renders online/local documents. react-pdf-react-pageflip · react-pdf-sample-forked-displaying-pdf-using-react ·
Top answer 1 of 11
74
If you goal is just to view the pdf in your application, the easiest way is using the object tag in HTML. You don't need to import any libraries and works most of the browsers. But this is lack of customization and styles.
<object data="http://africau.edu/images/default/sample.pdf" type="application/pdf" width="100%" height="100%">
<p>Alternative text - include a link <a href="http://africau.edu/images/default/sample.pdf">to the PDF!</a></p>
</object>
2 of 11
16
it looks like you're passing the PDF data directly to the <ReactPDF> component as the value of the file prop. But according to the docs you need to use an object containing a data property:
<ReactPDF
file={{
data: renderPdf
}}
/>
it seems you can also set file to an object containing a url property, to let ReactPDF fetch the pdf from your backend by itself, if that's easier:
<ReactPDF
file={{
url: 'http://www.example.com/sample.pdf'
}}
/>
npm
npmjs.com › package › pdf-viewer-reactjs
pdf-viewer-reactjs - npm
import React from 'react' import PDFViewer from 'pdf-viewer-reactjs' const ExamplePDFViewer = () => { return ( <PDFViewer document={{ url: 'https://arxiv.org/pdf/quant-ph/0410100.pdf', }} /> ) } export default ExamplePDFViewer
» npm install pdf-viewer-reactjs
Published Feb 15, 2021
Version 2.2.3
Author ansu5555
Telerik
telerik.com › components › overview
React PDF Viewer Overview - KendoReact
It is distributed through NPM under the kendo-react-pdfviewer package. The PDF Viewer is part of KendoReact premium, an enterprise-grade UI library with 120+ free and premium components for building polished, performant apps. Test-drive all features with a free 30-day trial.Start Free Trial · The following example demonstrates the KendoReact PDF Viewer in action.
DEV Community
dev.to › fileforge › create-an-engaging-react-pdf-viewer-a-step-by-step-guide-1hdl
Create an Engaging React PDF Viewer: a Step-by-Step Guide - DEV Community
July 25, 2024 - Building your own PDF viewer seems daunting. You need to account for text selection, links, zooming, and so on. And there is no real open-source solution! Well until now. In this article, we will show you how easy it is to set up a fully fledged React PDF viewer, using a new open source library.
Syncfusion
ej2.syncfusion.com › react › demos › pdfviewer › default
React PDF Viewer Default Example - Syncfusion Demos
This sample demonstrate the core features of PDF Viewer such as PDF viewing, printing, navigation, text search and selection, zooming, panning etc. with its built-in toolbar.