This is incorrect:

let Document = require('react-pdf');
let Page = require('react-pdf');

You are importing the entire module when you do this. That means that Document and Page both contain all the modules of react-pdf. Instead what you want to do is either import ReactPDF and reference those modules:

const ReactPDF = require('react-pdf');

<ReactPDF.Document />
<ReactPDF.Page />

or you could use destructuring:

import { Document, Page } from 'react-pdf';

//or

const { Document, Page } = require('react-pdf'); 

If TypeScript complains about missing declarations, just add a @types folder to your project, create a subfolder inside of it called react-pdf and file inside that folder called index.d.ts with one line:

declare module "react-pdf"
Answer from Robbie Milejczak on Stack Overflow
🌐
npm
npmjs.com › package › @types › react-pdf
@types/react-pdf - npm
Latest version: 7.0.0, last published: 2 years ago. Start using @types/react-pdf in your project by running `npm i @types/react-pdf`. There are 30 other projects in the npm registry using @types/react-pdf.
      » npm install @types/react-pdf
    
Published   Jun 06, 2023
Version   7.0.0
Discussions

reactjs - how to use pdfjs worker in react and typescript? - Stack Overflow
I'm trying to use pdfjs in a react+ts project. More on stackoverflow.com
🌐 stackoverflow.com
Document and Page Typescript typings are missing a children property
Describe the bug As of lately, neither Page nor Document component can be used with children. I've copied the code from the quick start guide on https://react-pdf.org/ into a freshly created React app and receive the following Typescript... More on github.com
🌐 github.com
7
May 6, 2022
TypeScript and definitions.
Im wondering if typings could be added/maintained for this project? Iv got a patch almost ready to go in my own repo i could add it? Would it be too bold of me to even propose a conversion to TS? More on github.com
🌐 github.com
23
August 29, 2017
Please include TypeScript types in the package itself
Before you start - checklist I understand that React-PDF does not aim to be a fully-fledged PDF viewer and is only a tool to make one I have checked if this feature request is not already reported Description Currently TypeScript types a... More on github.com
🌐 github.com
10
November 30, 2021
🌐
React-pdf
react-pdf.org
React-pdf
React renderer for creating PDF files on the browser and server
🌐
React PDF Viewer
react-pdf-viewer.dev › docs › getting-started
Getting started - React PDF Viewer
The TypeScript definition files of `@react-pdf-viewer` packages use `export type` syntax which is only available from TypeScript 3.8.
🌐
CodeSandbox
codesandbox.io › examples › package › @types › react-pdf
@types/react-pdf examples - CodeSandbox
Use this online @types/react-pdf playground to view and fork @types/react-pdf example apps and templates on CodeSandbox.
🌐
PDF.js Express
pdfjs.express › blog › how-to-build-pdf-viewer-typescript-pdf-js
How to Build a PDF.js Viewer in React + Typescript | Blog
September 3, 2019 - PDF.js Express wraps a modern react-based UI around the open source PDF.js rendering engine. It includes out-of-the-box features like annotations, form filling and e-signatures, and the viewer is commercially supported. It also comes with a large set of APIs for easy customization. Check out the demo to see it in action. This section will walk you through adding a TypeScript ...
🌐
npm
npmjs.com › package › react-pdf
react-pdf - npm
February 25, 2026 - Latest version: 10.4.1, last published: 2 months ago. Start using react-pdf in your project by running `npm i react-pdf`. There are 1051 other projects in the npm registry using react-pdf.
      » npm install react-pdf
    
Published   Feb 25, 2026
Version   10.4.1
Find elsewhere
🌐
CodeSandbox
codesandbox.io › examples › package › react-pdf
react-pdf examples - CodeSandbox
react-pdf · 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 ·
🌐
GitHub
github.com › wojtekmaj › react-pdf
GitHub - wojtekmaj/react-pdf: Display PDFs in your React app as easily as if they were images. · GitHub
Display PDFs in your React app as easily as if they were images. - wojtekmaj/react-pdf
Starred by 11K users
Forked by 999 users
Languages   TypeScript 94.5% | CSS 5.4% | HTML 0.1%
🌐
Medium
medium.com › investing-in-tech › creating-api-driven-pdfs-on-the-fly-in-the-browser-using-react-react-pdf-and-typescript-78ab4d1e7da5
Creating API driven PDFs on the fly in the browser using React, react-pdf and TypeScript | by Paul Brickles | ii technology blog | Medium
June 27, 2019 - Note that our initial state for data is necessary as TypeScript is not able to infer the type from an empty or undefined state, as it can with the other boolean types. We then do a simple API call to fetch the data we need for the document. Once we have the data, we can pass it as props to the <TestDocument /> component, which itself is passed as a prop to the <PDFDocument /> component. At the different steps of the process we use the react-fontawesome package for some nice icons and a spinner to allow the user to understand that the app is processing the request.
🌐
GitHub
github.com › react-pdf-viewer › react-pdf-viewer
GitHub - react-pdf-viewer/react-pdf-viewer: A React component to view a PDF document · GitHub
// Core viewer import { Viewer .../index.css'; // Create new plugin instance const defaultLayoutPluginInstance = defaultLayoutPlugin(); <Viewer fileUrl='/assets/pdf-open-parameters.pdf' plugins={[ // Register plugins ...
Starred by 2.6K users
Forked by 296 users
Languages   TypeScript 97.5% | CSS 2.5%
🌐
GitHub
github.com › diegomura › react-pdf › issues › 1811
Document and Page Typescript typings are missing a children property · Issue #1811 · diegomura/react-pdf
May 6, 2022 - Create a new Create React App npx create-react-app test-app --template typescript · Add the required dependencies yarn add @react-pdf/renderer @craco/craco process assert browserify-zlib buffer stream-browserify
Author   pganster
🌐
CodeSandbox
codesandbox.io › examples › package › react-typescript-pdf-reader
react-typescript-pdf-reader examples - CodeSandbox
Use this online react-typescript-pdf-reader playground to view and fork react-typescript-pdf-reader example apps and templates on CodeSandbox.
🌐
Wojtekmaj
projects.wojtekmaj.pl › react-pdf
React-PDF
Easily display PDFs in your React app
🌐
GitHub
github.com › wojtekmaj › react-pdf › issues › 51
TypeScript and definitions. · Issue #51 · wojtekmaj/react-pdf
August 29, 2017 - 👍React with 👍1lantos1618😄React with 😄1moffsugita😕React with 😕1moffsugita
Author   danno-ax
🌐
GitHub
github.com › wojtekmaj › react-pdf › issues › 899
Please include TypeScript types in the package itself · Issue #899 · wojtekmaj/react-pdf
November 30, 2021 - B) Using those .d.ts files, react-pdf could be refactored to TypeScript .tsx files so react-pdf is written in TypeSript.
Author   dantman
🌐
Nutrient
nutrient.io › blog › sdk › how to build a reactjs pdf viewer with react pdf
How to build a React PDF viewer with react-pdf (2026) - Nutrient
January 28, 2026 - Yes. react-pdf ships type definitions and exports types like DocumentProps, PageProps, ThumbnailProps, and OutlineProps. This tutorial includes a full TypeScript implementation with a typed PDFViewerProps interface.