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!
- Documents are now loaded using
onLoadSuccess
ofDocument
andPage
components now returnpdf
andpage
respectively, giving you access to full PDF.js API.- 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.