Skip to content

ericrockey/react-pdf-sample

This branch is 8 commits behind michaeldzjap/react-pdf-sample:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

633f28c · Sep 17, 2022

History

80 Commits
Jan 16, 2019
Sep 17, 2022
Jan 16, 2019
Sep 25, 2020
Sep 25, 2020
Sep 17, 2021
Jan 16, 2019
Sep 25, 2020
Feb 6, 2022
Nov 10, 2021
Sep 17, 2022
Sep 17, 2022
Oct 30, 2020
Sep 25, 2020
Sep 25, 2020

Repository files navigation

dependencies

react-pdf-sample

A react-pdf + react-virtualized react-window sample project

Installation

  • npm install
  • npm run dev, npm run prod or npm run watch

Note: to serve the included sample pdf over http use something like http-server

Current Issues

  • Currently there is an issue with react-pdf's Page component in combination with react-virtualized's CellMeasurer component, where it seems setState({}) is being called after the Page component has been unmounted. This might only be an issue occurring on Chrome browsers, since Firefox doesn't print any warnings about this in the console.
  • Scrolling to a specific row using list.scrollToRow() does not seem to work properly. When clicking the button "Page 82" you should be directed to page 70 of the included sample pdf (the page that shows figure 4.2). When you click the "Page 82" button twice it seems you are directed to the right page. Clicking the "Last Page" button twice does not direct you to the right page however.
  • On Firefox the pdf pages are flickering on scroll. This might be solvable by adding the following optimisation to Page
  • Scrolling up/back after scrolling to a page using list.scrollToRow() causes jumpy behavior. This might be related?
  • Scrolling using scrollToItem() of react-window doesn't seem to be working.

About

A react-pdf + react-window Sample Project

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 81.4%
  • SCSS 14.8%
  • HTML 3.8%