1. Introduction
PrintThis is a great jQuery printing plugin that allows you to apply a printing page or a part of a page functionality on your website/application. The plugin can print one chosen DOM element or many of them at once. Printing canvas is also supported. PrintThis plugin lets you disable CSS styles and JavaScript scripts before printing the page.
2. Plugin Overview
Library | PrintThis |
Author | Jason Day and Samuel Rouse |
Licence | MIT Licence |
Repository | GitHub |
Dependencies | jQuery 1.3.1 |
3. How to install and use PrintThis jQuery plugin
The below section will give you instructions on how to install PrintThis plugin step by step.
1. load jQuery library and PrintThis JavaScript file
2. for specific DOM element that you want to print add unique id
3. initialize PrintThis plugin with that id selector in jQuery document ready function
PrintThis will print selected DOM element in the best quality it can.
4. Conclusion
In this article, we presented a jQuery plugin PrintThis designed for printing the whole page or just selected DOM elements. PrintThis supports printing images, plain text, canvas, div and many more. You can also disable JavaScript scripts.
{{ 'Comments (%count%)' | trans {count:count} }}
{{ 'Comments are closed.' | trans }}