Display PDFs in your React app as easily as if they were images.
MIT License
Bot releases are hidden (Show)
❗️ = breaking change
propTypes
were removed. If you’re using propTypes
, we recommend migrating to TypeScript or another type-checking solution.Published by wojtekmaj 8 months ago
Outline
, Page
and Thumbnail
components crashing when placed outside Document
, but provided with pdf
prop (#1709).vite-plugin-static-copy
suggesting a solution that doesn't work on Windows.Published by wojtekmaj 9 months ago
renderMode
is deprecated and will be removed in the future.tiny-warning
with more popular (and equally tiny!) warning
.Published by wojtekmaj 10 months ago
Published by wojtekmaj almost 1 year ago
Published by wojtekmaj about 1 year ago
PasswordResponses
type to make it easier to create custom password prompts (#1615). Thanks, @pstevovski!options
prop and usage with Next.js.Published by wojtekmaj about 1 year ago
index.test.js
entry not working in pure ESM mode with "moduleResolution": "node16" TypeScript option enabled.Published by wojtekmaj about 1 year ago
Published by wojtekmaj about 1 year ago
Published by wojtekmaj about 1 year ago
Published by wojtekmaj about 1 year ago
Published by wojtekmaj about 1 year ago
renderMode
: "custom"
. When set, you can pass custom renderer function to customRenderer
prop (#1408).'use client';
to the parent component for this component to work.options
prop value (#1567).@types/react
and @types/react-dom
are now optional peerDependencies, which eliminates errors caused by duplicate typings.Published by wojtekmaj over 1 year ago
clsx
dependency to 2.0.0
to enable ESM support in the near future.Published by wojtekmaj over 1 year ago
customTextRenderer
not working on documents without marked content (#1530, #1531). Thanks, @MattL75!Published by wojtekmaj over 1 year ago
Published by wojtekmaj over 1 year ago
Large and exciting release, full of improvements and new features, mainly thanks to our contributors, @kostassite, @iamandrewluca and @MattL75, and sponsors. Become a sponsor and help making React-PDF even better!
Thumbnail
component which lets you render thumbnails (#898, #1519).pdf.annotationStorage
in pdf
provided in onDocumentLoadSuccess
callback and listen for form data changes (#1518). Thanks, @kostassite!useDocumentContext
, useOutlineContext
and usePageContext
. These hooks allow you to build custom components that hook (pun not intended) into React-PDF API (#1505). Thanks, @iamandrewluca!onItemClick
was not provided neither to Document
nor Outline
components, React-PDF will now attempt to navigate to the page of the clicked outline item on its own, just like it does for internal links.Page
: onGetStructTreeSuccess
and onGetStructTreeError
(#1494, #1498). Thanks, @MattL75!onItemClick
types incorrectly marking dest
as required.onItemClick
not passed from Document
to Outline
. Previously, you had to manually pass onItemClick
to Outline
component. Now, you only need to pass it to Document
.Published by wojtekmaj over 1 year ago
DocumentInitParameters
to be passed to options
prop.Published by wojtekmaj over 1 year ago
section
selector styled.Published by wojtekmaj over 1 year ago
Published by wojtekmaj over 1 year ago
See Upgrade guide from version 6.x to 7.x.
This is one of the biggest update - for React-PDF and for me personally. React-PDF has been rewritten from scratch using TypeScript and React Hooks. I've put a tremendous amount of effort to modernize the package without introducing any major breaking changes. If, however, something have slipped through 137 unit tests we have, please let me know. I hope you will like it.
❗️ = breaking change
renderInteractiveForms
prop--scale-factor
CSS-variable must be set" error.