Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new prop print to use instead of the default window.print #272

Merged
merged 4 commits into from
Aug 24, 2020

Conversation

MatthewHerbst
Copy link
Owner

This adds a new function prop print, which when passed is used instead of window.print to complete the print functionality. This can be useful for users who want to print in non-browser environments where window.print does not exist. The print method is supplied with the target iframe which has all the content of the print in it. The print method must return a Promise so that react-to-print can continue when printing is completed.

Fixes #270

@MatthewHerbst MatthewHerbst merged commit f02e222 into master Aug 24, 2020
@MatthewHerbst MatthewHerbst deleted the print-replacer branch August 24, 2020 05:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

React-to-print with Electron silent printing
1 participant