-
Download it on the chrome extension store, for free!
-
Set the extention up for development:
git clone https://github.com/MichaelDimmitt/print-toConsole-andFile.git
cd print-toConsole-andFile
open chrome://extensions
ensure dev tools are enabled in the top right corner of this page
and click load unpacked and go to select the directory for this project
https://github.com/orbitbot/chrome-extensions-examples/tree/master/print
https://developer.chrome.com/extensions/samples#search:print
- onclick event on the extension icon runs some javascript.
- window.print() - javascript -- sends the rendered html to a physical printer!
but I did not want to use a printer.
- console.log(window.body)
- saveAs(window.body)
note: could have also used:
window.document.getElementsByTagName('body')[0].outerHTML