yarn react-pdf 4.0.0

latest releases: 8.0.2, 7.7.3, 8.0.1...
5 years ago

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

Note: React <16.3 is not supported. If you're still using React older than 16.3, please use react-pdf@^3.0.0 instead.

What's new?

  • React-PDF now uses new Context API giving it much improved reliability and stability.
  • React-PDF now uses PDF.js 2.0, bringing in a lot of fixes and improvements.
  • Webpack 4.x and Create-React-App 2 are now supported (#179).
  • React-PDF is now fully compatible with React 17 (sic!).
  • Interactive forms can now be rendered by toggling renderInteractiveForms flag.
  • You can now use height prop on Page component to scale the page. height will be ignored if you provide width as well. More details in README.md (#236).
  • You can now attach keyboard events to <Page /> component.
  • Added support for password encrypted PDFs. You can use onPassword prop to overwrite default password prompt (#241).
  • You can now pass onLoadProgress callback to Document component to be updated on document loading progress. This may come in handy if you load PDF to be displayed from a web server (#238)
  • You can now pass renderMode prop to all Page components by adding it to wrapping Document component instead.
  • Added externalLinkTarget prop which allows to configure target for external links rendered in annotations (#262).
  • Added renderMode none which does not render the main layer at all (#283).

What's changed?

  • You can no longer use React-PDF without Web Worker.
  • setOptions function has been replaced with much more powerful options prop in Document component.
  • TextLayer is now rendered over SVG to match Canvas rendering mode behavior.
  • Removed max-width from rendered SVG to match Canvas rendering mode behavior (#251).
  • renderAnnotations was renamed to renderAnnotationLayer for consistency. You don't need to change anything in your code just yet.
  • Clarified documentation for onItemClick.
  • React-PDF now uses Babel 7 for compilation (#270).

Don't miss a new react-pdf release

NewReleases is sending notifications on new releases.