Skip to content

Releases: wojtekmaj/react-pdf

v6.0.0-beta.5

05 Nov 22:41
21d0e90
Compare
Choose a tag to compare
v6.0.0-beta.5 Pre-release
Pre-release

❗️ = breaking change

What's new?

  • Added official support for Vite.
  • Removed dependency on @babel/runtime.

What's changed?

  • ❗️ Dropped support for React content in customTextRenderer (#1124).

Bug fixes

  • Fixed Page wrapper allowing to shrink causing children to overflow (#1118).

v6.0.0-beta.4

07 Oct 09:21
7eda01a
Compare
Choose a tag to compare
v6.0.0-beta.4 Pre-release
Pre-release

What's new?

  • Updated PDF.js to 2.16.105.
    • Bugfixes
    • Accessibility improvements
    • Rendering quality improvements.
  • Improved documentation.
    • Fixed instructions on PDF.js worker
    • Added missing documentation on onRenderTextLayerError and onRenderTextLayerSuccess
    • Added a note on SVG mode deprecation.
  • React-PDF now warns if required CSS files are not imported.

What's changed?

  • Removed support for enhanceTextSelection prop. This was previously implemented in 6.0.0-beta, but later found deprecated in PDF.js.

Bug fixes

  • Fixed legacy renderInteractiveForms prop ignored. Thanks, @liquidautumn!

v6.0.0-beta.3

27 Jul 10:06
fdd0b71
Compare
Choose a tag to compare
v6.0.0-beta.3 Pre-release
Pre-release

What's changed?

  • file-loader is now an optional peerDependency (#970). Thanks, @rpaasche!

v6.0.0-beta.2

05 Jul 13:03
8ed9285
Compare
Choose a tag to compare
v6.0.0-beta.2 Pre-release
Pre-release

What's changed?

  • Improved documentation on Preact compatibility.

Bug fixes

  • Fixed crash when text layer in PDFs rendered by React-PDF was used in Preact applications.

v6.0.0-beta

05 Jul 12:20
2c9efdd
Compare
Choose a tag to compare
v6.0.0-beta Pre-release
Pre-release

See Upgrade guide from version 5.x to 6.x.

Note: React <16.8 is not supported. If you're still using React older than 16.8, please use react-pdf@^5.0.0 instead.

❗️ = breaking change

What's new?

  • ❗️ Vastly improved performance and bundle size thanks to the modern version of PDF.js that is now used. This drops support for legacy browsers. See README for details.
  • Updated PDF.js to 2.14.305 (#1019).
    • Improvements for the text layer (space insertion)
    • Improvements for canvas rendering (thin line rendering)
    • Improvements for forms (printing/saving of choice lists)
    • Improvements for accessibility (sidebar and search results).
    • Bug fixes and optimizations, in particular for annotations, font/image conversion, SMask rendering, text layer rendering and TypeScript definitions.
    • Performance improvements for rendering image masks, Type3 fonts and certain drawing instructions
    • Support for specifying custom background/foreground colors for rendering in the viewer (this will be soon be supported in React-PDF).
  • Refactored TextLayer to use pdfjs.renderTextLayer (#944).
    • Added support for enhanceTextSelection prop.
    • Added support for onRenderTextLayerError prop.
    • Added support for onRenderTextLayerSuccess prop.

What's changed?

  • ❗️ Minimum React version is now 16.8.
  • ❗️ onGetTextSuccess is now called with an object containing items and styles.
  • ❗️ TextLayer.css now must be imported manually for TextLayer to work properly.

Bug fixes

  • Fixed crash when attempting to cancel rendering of PageCanvas.

v5.7.2

30 Mar 15:18
cf0ee8c
Compare
Choose a tag to compare

What's new?

  • Added instructions on support for standard fonts.
  • Make findDocumentSource cancellable, cancel running tasks in loadDocument before finding source (#947).

Bug fixes

  • Fixed Page not rendering in canvas rendering mode (default) when using React 18 w. StrictMode on (#972).

v5.7.1

09 Feb 16:32
d4ef2f5
Compare
Choose a tag to compare

What's changed?

  • Replaced deprecated renderInteractiveForms option with annotationMode in page.render call (#946).

Bug fixes

  • Use workerPort instead of workerSrc in Parcel 2 specific entry (#941). Thanks, @jamesjessian!
  • Fixed regression that caused interactive forms to be always rendered.

v5.7.0

26 Jan 11:44
fc276cc
Compare
Choose a tag to compare

Biggest one in months!

What's new?

  • Added support for React 18.
  • Added official support for Parcel 2.
  • Added new Webpack 5-specific entry file. It uses Webpack's new URL assets instead of worker-loader, which turned out to be quite problematic in the past. Don't worry, if you want to stick to the old Webpack-specific one, it should still work just fine!
  • Updated PDF.js to 2.12.313 (#936).
    • Improved XFA support
    • Improved pattern/tiling support
    • Rich text annotation support
  • Added support for externalLinkRel prop.
  • Added dest and pageIndex to onItemClick callbacks (#812, #924). Thanks, @malwilley!

What's changed?

  • Updated cMaps instructions to work with Yarn PnP.
  • Updated PDF.js worker instructions for clarity.
    • Specify how to make it work with Create React App 5.
  • Added instructions on how to manually copy cMaps directory.
  • Added instructions on how to manually copy pdf.worker.js.
  • Added Create React App 5 sample suite.
  • Added Parcel 2 sample suite.

v5.6.0

13 Dec 09:12
df96ae3
Compare
Choose a tag to compare

What's new?

  • Updated PDF.js to 2.10.377 (#900).
    • Improved XFA support (#856).

v5.5.0

25 Oct 07:39
722dfd1
Compare
Choose a tag to compare

What's new?