We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
iframe
1 parent 1ed74f8 commit 643919dCopy full SHA for 643919d
src/index.tsx
@@ -218,8 +218,8 @@ export default class ReactToPrint extends React.Component<IReactToPrintProps> {
218
printWindow.width = `${document.documentElement.clientWidth}px`;
219
printWindow.height = `${document.documentElement.clientHeight}px`;
220
printWindow.style.position = "absolute";
221
- printWindow.style.top = "-1000px";
222
- printWindow.style.left = "-1000px";
+ printWindow.style.top = `-${document.documentElement.clientHeight + 100}px`;
+ printWindow.style.left = `-${document.documentElement.clientWidth + 100}px`;
223
printWindow.id = "printWindow";
224
// Ensure we set a DOCTYPE on the iframe's document
225
// https://github.com/gregnb/react-to-print/issues/459
0 commit comments