Skip to content

Releases: wojtekmaj/react-pdf

v2.1.5

30 Sep 09:39
Compare
Choose a tag to compare

Bug fixes

  • Recovered compatibility with React <16.0.0 that have been lost in version v2.1.3. Sorry for inconvenience!

v2.1.4

28 Sep 21:48
Compare
Choose a tag to compare

What's new?

  • On development builds, React-PDF will now show all errors in the console. There's no more need of catching all errors manually (#73). Thanks for suggestion, @hurkanyakay!

Bug fixes

  • Fixed an issue that caused <Page>'s text content to be misaligned when the page was rotated sideways.

v2.1.3

28 Sep 20:49
Compare
Choose a tag to compare

What's new?

  • Updated sample and test suites to use React 16.0.0.
  • Updated dependencies.
  • Updated documentation to note that <Page> components ideally should be a direct children of <Document> component (#65). Thanks, @Anenth!

Bug fixes

  • babel-runtime dependency has been moved from devDependencies to dependencies.

v2.1.2

10 Sep 10:51
Compare
Choose a tag to compare

Bug fixes

  • Fixed a small error in test suite causing it to allow the user to navigate beyond the last page.
  • Increased compatibility of sample and test suites with Internet Explorer 11 and other legacy browsers.

v2.1.1

09 Sep 20:50
Compare
Choose a tag to compare

Bug fixes

  • Ensure that non-ES6 environments won't fail because of ES6-only version of merge-class-names.

v2.1.0

09 Sep 19:20
Compare
Choose a tag to compare

What's new?

  • Added support for server-side rendering using Node.js.
  • You can now pass custom class names to Document, Page and Outline components (#58).
  • Added support for all mouse events and touch events on Document, Page and Outline components (#59).
  • You can now pass custom children to Page component.

What's improved?

  • Vastly improved performance of loading files via data: URL (side note: that's how files are loaded if you import them using Webpack's file-loader).

Bug fixes

  • Fixed loading file via Blob resulting in callback loop (#54).
  • Fixed small error in sample code in documentation (thanks, @robsco-git!)

v2.0.0

05 Sep 21:22
Compare
Choose a tag to compare

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

What's new?

  • Now there's more React in React. React-PDF's structure has been completely rewritten (#27).
    • Documents are now loaded using Document component.
    • Pages are now rendered in Page components. They are meant to be rendered inside Document component. And yes, this means you can now render many pages at once!
    • You can render now table of contents using Outline component.
  • Support for text layers! This means the text rendered by Page component can be selected or read by a screen reader (nnarhinen/react-pdf#52). Rendering text layer is enabled by default, but you can disable it by using renderTextLayer flag.
  • All React-PDF methods (loadDocument, loadPage etc.) now return a promise for your convenience.
  • onLoadSuccess of Document and Page components now pass pdf and page respectively to their success handlers, giving you access to full PDF.js API.
  • New entry - entry.noloader - which gives you an ability not to create a separate thread for rendering PDFs. See README for more information.
  • React-PDF now respects page's default rotation. In v1.x, rotation was always set to 0 unless rotate prop was passed. Now React-PDF renders pages in their default rotation as defined in PDF file.
  • Default entry will now display a warning if you're developing on a local file system.
  • It's now easier to style No data, Error and Loading messages as they now have their own CSS classes.
  • New sample PDFs were added.
  • README file has been updated.
    • Added instructions for non-Webpack projects.
    • Added instructions for babel-polyfill.
  • Sample and Test pages have been updated.
    • Both pages are now mobile friendly.
    • Sample page now renders an entire PDF at once.
    • Test page now has an Outline section with sample navigation.
  • Optimized NPM package. It no longer includes files not necessary for end user.

Bug fixes

  • Fixed pages rendered sometimes being blurry due to the lack of rounding width/height down.
  • Fixed PDF.js attempting to load worker from a random location (depending on the name of the last script included in head at the moment of loading PDF.js). It is now set to pdf.worker.js (nnarhinen/react-pdf#39).
  • React-PDF will no longer warn Warning: setState(...): Can only update a mounted or mounting component. if you unmount it while loading a file or rendering a page (#43).

v2.0.0-beta.5

05 Sep 21:15
Compare
Choose a tag to compare
v2.0.0-beta.5 Pre-release
Pre-release

What's new?

  • Updated dependencies to the newest versions. This also ensures that faulty PDF.js that failed to load files is blocked.

Bug fixes

  • Fixed an issue where empty Document component would fail to render throwing uncaught error.
  • Fixed an issue where onDocumentLoad callbacks were not properly cancelled on unmount, if the latter happened before the page loaded.

v2.0.0-beta.4

29 Aug 00:14
Compare
Choose a tag to compare
v2.0.0-beta.4 Pre-release
Pre-release

What's new?

  • npm package is now lighter as it does not contain unnecessary files.

Bug fixes

  • Fixed an edge case where React-PDF was not properly handling a situation when it was immediately unmounted after mounting, which caused React to throw warnings.

v2.0.0-beta.3

26 Aug 23:59
Compare
Choose a tag to compare
v2.0.0-beta.3 Pre-release
Pre-release

What's new?

  • babel-polyfill is no longer required to use react-pdf. Thanks, @Kerumen!
  • You can now disable rendering text layers by passing renderTextLayer={false} to Page component.

Bug fixes

  • Fixed an error ReferenceError: regeneratorRuntime is not defined that may have occurred on some environments (#39). Thanks, @Kerumen!