I want to print the page on button click without opening a new tab.
I have a following lines of code that does the job for me.
function PrintDiv() {
Simply use a media query to hide when printing
@media print { #button-container{ display: none; } }