There are many scenarios where you want to print just a section of a page and not the whole web page.
To achieve it first we should make sure that the web page is printout friendly.
I have shown below an example of how you can print just a section of a page and not the whole page.
In this example I have given an id to the portion which I want to print.
First of all using jquery a window is opened, later it fetches the html data from the portion which is to be printed using its id and then sends it to popup which is opened.
We close the document, execute the print command and finally close the popup window.
This is the whole process how you can print a portion of a page and not the whole page.
I hope this tutorial will help you lot.
Don’t forget to leave feedback/comments/questions.