Skip to content

A demonstration of how the react-pdf should work with CRA-generated application

License

Notifications You must be signed in to change notification settings

peterdee/pdf-view

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Viewing PDF files with React

A demonstration of how the react-pdf should work with CRA-generated application.

Stack: React, React-PDF.

Deploy

git clone https://github.com/peterdee/pdf-view
cd ./pdf-view
nvm use 14
npm i -g yarn
yarn

Modules locking

Module versions are locked.

This is necessary only for the react-pdf though, as the contents of worker.js in the public directory was copied from the pdfjs-dist/build/pdf.worker.min.js file.

Launch

yarn start

Application is available at http://localhost:3000

Build

yarn build

The public directory contains a worker.js file that should be copied to the build folder, otherwise react-pdf will not work properly when static files are created.

Serve static

yarn serve

Static files are served with express on http://localhost:5500

LICENSE

MIT

About

A demonstration of how the react-pdf should work with CRA-generated application

Topics

Resources

License

Stars

Watchers

Forks