react-to-print
Advanced tools
Changelog
2.14.15 (October 2nd, 2023)
This is a republish of 2.14.14 since that version got screwed up by some downtime at npm and seems to be in an unrecoverable state.
Changelog
2.14.14 (September 22nd, 2023)
<link>
nodes that have multiple value rel
attributes set such as rel="prefetch stylesheet"
, and, ensure proper handling of <link>
nodes using rel="preload" + as="style"
media
attribute set on <link>
nodesdevDependencies
to their latest versionsChangelog
2.14.13 (June 7th, 2023)
print
function we were not waiting for that function to resolve its promise before removing the printing iframe if removeAfterPrint={true}
was set. Further, we were not calling onAfterPrint
at all when a custom printing function was passed. While not strictly needed since the caller knows when the printing has completed by resolving the promise, we now call onAfterPrint
when that promise has resolved and before removing the print iframeprop-types
. The package now has zero dependencies
🪓devDependencies
to their latest versionsrequire.d.ts
, .babelrc
, and an unused exampleChangelog
2.14.12 (February 18th, 2023)
devDependencies
Changelog
2.14.11 (January 3rd, 2023)
Happy new year! We can't wait to see what 2023 brings
fonts
to print if they are givenfonts
are passed by the browser doesn't support the FontFace
APIdevDependencies
Changelog
2.14.10 (November 17th, 2022)
iframe
size to be dynamic but didn't take into account the fixed offset we were giving to hide it on the page. This resulted in the print iframe
being partially visible when printing on wide screens. This has been correctedChangelog
2.14.9 (November 14th, 2022)
iframe
used for printing has the same viewport size as the parent window of the node being printed. Prior to this the browser set the default 300px/150px size on the iframe
, causing code that changes styles based on viewport sizes (such as many grid systems) to sometimes change the display of the elements being printed, requiring CSS hacks to avoid. Thanks dantecarlo for reviving this issueChangelog
2.14.8 (November 3rd, 2022)
<link>
nodes marked with the disabled
attribute were causing printing to hang. Thanks luckrnx09ReactToPrint
needed to specify a children
prop to fully support React 18) which was corrected. Other dependencies were also updated, mostly dropping Node 12 support