Introduction

Installation

Installation of @mikecousins/react-pdf is very easy.


How To Install

There are only three peer dependencies that our library requires:

  • react
  • react-dom
  • pdfjs-dist

We will assume you already have react & react-dom installed and will focus on @mikecousins/react-pdf and pdfjs-dist.

pnpm

To install using the pnpm package manager:

pnpm add @mikecousins/react-pdf pdfjs-dist

npm

To install using the npm package manager:

npm i @mikecousins/react-pdf pdfjs-dist

yarn

To install using the yarn package manager:

yarn add @mikecousins/react-pdf pdfjs-dist

Next Steps

That's it! Next you'll want to choose how to use the library and for that we have two modes, component for basic use cases and hook for more customization.

Previous
Getting started