react-to-print
Advanced tools
Changelog
2.14.4 (January 24th, 2022)
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 outputChangelog
2.14.3 (December 25th, 2021)
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.video
elementsdevDependencies
have been upgraded to their latest and greatestHappy new years!
Changelog
2.14.2 (December 14th, 2021)
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.Changelog
2.14.1 (November 21st, 2021)
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 helpFontFace
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-xxReact.forwardRef
Changelog
2.14.0 (October 20th, 2021)
documentTitle
will now properly set the filename when printing as a PDF in Chrome, Firefox, and SafariReact.forwardRef
can be printed as welldevDependencies
have been upgraded to their latest and greatestChangelog
2.13.0 (August 4th, 2021)
nonce
property to be used with CSP. Thanks @Arcturus5404 and @nenonja