yarn react-pdf 3.0.0

latest releases: 9.1.1, 9.1.0, 9.0.0...
6 years ago

See Upgrade guide from version 2.x to 3.x.

What's new?

  • Context-based architecture. Now, React-PDF's components don't need to be direct descendants of Document component, which makes styling much easier (#124).
  • React-PDF now supports Parcel bundler out of the box (#141).
  • React-PDF now have a set of unit tests to ensure quality and reliability (#125).
  • pageIndex and pageNumber props are now checked better. Now React-PDF will warn you when given pageIndex or pageNumber that does not exist in a given file.
  • Minor performance optimizations when loading a page.
  • Improved performance of SVG rendering when rescaling (#138).
  • Improved rendering performance of Outline.
  • Improved stability of PageAnnotations rendering, especially in non-browser environments.
  • Updated README file to include callbacks from PageAnnotations and PageTextContent components.
  • Updated dependencies of React-PDF as well as of its Sample and Test suites, most notably removed deprecated babel-preset-es2015 in favor of babel-preset-env.
  • You can now use customTextRenderer prop for custom text rendering in Page component (Canvas rendering mode only) (#163). Thanks, @juliakieserman!

What's changed?

  • Messages (loading, error, no data) are now rendered inside their component wrappers, not instead of them.
  • React-PDF class names have been changed to ensure testability and easier styling. For more details, see Upgrade guide for React PDF 2.x users.
  • React-PDF package and its subpackages now all build into dist directories instead of build directories.
  • Annotations stylesheet is not automatically imported anymore. If you'd like to support annotations, you'd need to import it yourself. I you would not, this means less configuration and easier to set up server-side rendering (#133, #140).

Bug fixes

  • Fixed PageSVG not calling onRenderSuccess when rendered page.
  • Fixed unmounting Page component throwing an error when page was not yet loaded.
  • Fixed an issue that could have caused empty page callback in onLoadSuccess.
  • Fixed getPageIndex returning pageIndex higher in priority than pageNumber, when given both.
  • Fixed onLoadSuccess calling onLoadSuccess before state with new pdf has been set, which could result in scripts relying on pdf's existence to fail if they fired too early.
  • Fixed Warning: Failed prop type: text appearing twice in custom PropTypes warning messages.
  • Fixed a configuration bug that could have caused React-PDF to behave unexpectedly on React 15.x environments.

Don't miss a new react-pdf release

NewReleases is sending notifications on new releases.