Releases: wojtekmaj/react-pdf
Releases · wojtekmaj/react-pdf
v2.1.5
v2.1.4
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
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 fromdevDependencies
todependencies
.
v2.1.2
v2.1.1
v2.1.0
What's new?
- Added support for server-side rendering using Node.js.
- You can now pass custom class names to
Document
,Page
andOutline
components (#58). - Added support for all mouse events and touch events on
Document
,Page
andOutline
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
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 insideDocument
component. And yes, this means you can now render many pages at once! - You can render now table of contents using
Outline
component.
- Documents are now loaded using
- 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 usingrenderTextLayer
flag. - All React-PDF methods (
loadDocument
,loadPage
etc.) now return a promise for your convenience. onLoadSuccess
ofDocument
andPage
components now passpdf
andpage
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
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
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
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}
toPage
component.