Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-to-print

Package Overview
Dependencies
Maintainers
2
Versions
94
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-to-print - npm Package Versions

1
10

2.14.5

Diff

Changelog

Source

2.14.5 (March 31st, 2022)

  • FIX 479: React 18 is now a supported peerDependency. Thanks fabb
herbstmb
published 2.14.4 •

Changelog

Source

2.14.4 (January 24th, 2022)

  • FIX 459: react-to-print now ensures that a DOCTYPE is set on the print iframe. Without this some browsers could render the print iframe in quirks mode, possibly changing the output
  • CHORE: Removed some debugging statements that made it into a previous production build
  • CHORE: Updated all dependencies
  • DOCS: Added a section with a link to a fully-working Electron example
herbstmb
published 2.14.3 •

Changelog

Source

2.14.3 (December 25th, 2021)

  • FIX 439: react-to-print now waits for video elements to load before printing. While this should work in most cases, we highly recommend setting the poster attribute of the video, which allows specifying an image to be a placeholder for the video until the video loads.
  • CHORE: cleaned up the examples code a bit, including adding tests for video elements
  • CHORE: all devDependencies have been upgraded to their latest and greatest

Happy new years!

herbstmb
published 2.14.2 •

Changelog

Source

2.14.2 (December 14th, 2021)

  • FIX: As seen in 441 when using the useReactToPrint hook along with TypeScript and strict checking the user is currently required to ensure that the return of useReactToPrint isn't undefined, since that is what is returned if the user is using a version of React that does not support hooks. To remove the need for this check useReactToPrint will now return a function that throws an error if the version of React does not support hooks.
herbstmb
published 2.14.1 •

Changelog

Source

2.14.1 (November 21st, 2021)

  • FIX 429: Attempting to access the contents of a cross-origin stylesheet is forbidden by scripts, and attempting to do so would cause react-to-print to crash. Upstream work in the browsers is required to find a proper solution to this, read more in the issue. A try/catch has been added around the offending code, along with a warning message with tips on how to resolve. Thanks @JoshuaKGoldberg for lots of debugging help
  • FIX 432: TypeScript 4.4 shipped with FontFace support in its lib definitions which caused react-to-print to fail to build locally on versions of TypeScript >= 4.4 since our FontFace definitions clashed with those now in TypeScript. This has been resolved, thanks @oxygen-xx
  • DOCS 422: The README was updated to properly reflect that functional components can be used so long as they are wrapped with React.forwardRef
  • DOCS 430: A typo was fixed, thanks @hsusanoo
herbstmb
published 2.14.0 •

Changelog

Source

2.14.0 (October 20th, 2021)

  • FIX 391: Setting documentTitle will now properly set the filename when printing as a PDF in Chrome, Firefox, and Safari
  • FIX: a rare (no reported events) edge case could cause printing to hang if an image failed to load and error logging was not enabled. This has been fixed
  • FEATURE: the UI for running the examples has been massively improved. Try them out! We will be porting this to our official CodeSandbox example soon.
  • CHORE: changed an error message saying only class based components are allowed to be printed to clarify that functional components wrapped in React.forwardRef can be printed as well
  • CHORE: refactored logging code to be DRYer and simpler to use
  • CHORE: all devDependencies have been upgraded to their latest and greatest
  • DOCS: major improvements to the README, including making some examples more concise, adding information about using functional components to print, adding some new pitfalls, and adding information about known issues when printing in mobile WebViews (see #384 for more)
herbstmb
published 2.13.0 •

Changelog

Source

2.13.0 (August 4th, 2021)

herbstmb
published 2.12.6 •

Changelog

Source

2.12.6 (May 31st, 2021)

  • FIX 379: img tags missing a src attribute should not prevent printing
herbstmb
published 2.12.5 •

Changelog

Source

2.12.5 (May 29th, 2021)

  • CHORE: Upgraded devDependencies
herbstmb
published 2.12.4 •

Changelog

Source

2.12.4 (April 10th, 2021)

  • CHORE: Upgraded all devDependencies
  • DOCS: Added a section to the README about workarounds for functional components as the ComponentToPrint
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc