PrintPageArea() opens a new web page content window and printing option based on the ID element provided. You can use this function to print a specific web page area or full web page content.
var printContent = document.getElementById(areaID);
var WinPrint = window.open('', '', 'width=900,height=650');
Use the printPageArea() function on the Print button element event and provide the content area of the div ID that you want to print.
The print button that will trigger the printPageArea() function by clicking on it.
HTML content which needs to be printed.
All the printable content goes here......