Skip to content

Releases: wojtekmaj/react-pdf

v5.0.0-beta

07 Dec 20:22
8c62642
Compare
Choose a tag to compare
v5.0.0-beta Pre-release
Pre-release

❗️ = breaking change

What's new?

  • ❗️ React-PDF now ships with ES6 Modules along with CommonJS modules. This allows for Webpack and other bundlers to optimize your code better.
  • Updated PDF.js from 2.1.266 to 2.2.228.

Bug fixes

  • Fixed memory leak after unmounting Document (#452, #505). Thanks, @oze4!
  • Fixed error, loading, noData propTypes not accepting functions (#579).
  • Fixed PDF rendering incorrectly if wrapped in an element with dir="rtl" (#588).

v4.2.0

27 Jul 10:40
fffb77b
Compare
Choose a tag to compare

What's new?

  • Greatly improved documentation. Thanks, everyone!

What's changed?

  • Development platform upgrade - now v4.x branch uses the same build tools as v5.x branch.

Bug fixes

  • Fixed memory leak after unmounting Document (#452, #505). Thanks, @oze4!
  • Fixed error, loading, noData propTypes not accepting functions (#579).
  • Fixed PDF rendering incorrectly if wrapped in an element with dir="rtl" (#588).

v4.1.0

12 Jun 13:40
b2123e6
Compare
Choose a tag to compare

What's new?

  • You can now use ref on Page and Outline components.
  • You can now pass render functions to error, loading, noData props (#390).
  • React-PDF will now cancel loading a document if a new document was provided (#357).

What's changed?

  • Improved documentation for Create-React-App users (#369). Thanks, @suyesh!

Bug fixes

  • Fixed font family in TextLayer not properly recognized in some cases (#385).
  • Fixed onParseError, onParseSuccess still documented despite being removed (#400).

v4.0.5

03 Mar 17:02
Compare
Choose a tag to compare

Bug fixes

  • Fix onPassword and onLoadProgress props not working (#364).
  • Fixed text layer vertically misaligned in some cases (#332).

v4.0.4

01 Mar 13:31
Compare
Choose a tag to compare

What's changed?

  • TextLayer items are now rendered using span elements, making it easier to select the text.
  • Improved memory consumption on many browsers, including Firefox and iOS Safari (#335). Thanks, @robsco-git!

Bug fixes

  • Fixed "Deprecated API usage: RenderTask.then method, use the promise getter instead" (#354).

v4.0.3

17 Feb 11:57
Compare
Choose a tag to compare

What's new?

  • Updated PDF.js to 2.1.266

Bug fixes

  • Fixed "Error: Can't resolve 'babel-runtime/regenerator'" error (#310).
  • Fixed documentation for onPassword (#333). Thanks, @hdwatts!

v4.0.2

05 Jan 11:59
Compare
Choose a tag to compare

What's changed?

  • Using Parcel, if you decide for whatever reason to import from src directory instead of default dist, Parcel will properly recognize it and use proper Babel configuration.

Bug fixes

  • Fixed width/height props not working with scale prop correctly (#322).
  • Fixed an error that has caused setState warning on an unmounted component (#328) if you changed the page before the previous one has fully loaded.

v4.0.0

23 Nov 10:26
Compare
Choose a tag to compare

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).

v3.0.6

21 Nov 10:23
Compare
Choose a tag to compare

This is most likely the last release from 3.x branch. It picks the bug fixes made during React-PDF 4.x development back to 3.x version for developers which chose to use older versions of React.

What's new?

  • Added documentation for renderMode.

Bug fixes

  • Fixed annotation rendering multiple times if an update which does not reset the layout occurs (#192).
  • Fixed TextLayerItem re-rendering too often (#213, #215). Thanks, @lsimkins!
  • Fixed a false positive PropTypes error when passed a React node as error or loading props (#293). Thanks, @pimmey!
  • Fixed page not displaying when passed null to scale prop.

v4.0.0-beta.6

17 Nov 10:05
Compare
Choose a tag to compare
v4.0.0-beta.6 Pre-release
Pre-release

What's new?

  • Added renderMode none which does not render the main layer at all (#283).

What's changed?

  • renderAnnotations was renamed to renderAnnotationLayer for consistency. You don't need to change anything in your code just yet.

Bug fixes

  • Pinned down PDF.js version to 2.0.550 because of breaking changes in 2.0.943 (#298).