This version is old school.
Please find jQuery plugins on npm.
PrintArea
by Chris Ritschard
Prints a specific area of the page. Using json settings, the printed area is either opened in a popup or in a hidden iframe. Minimal setup and easy to use. See the demo for examples and usage of the options.